mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix media viewer for medias not related to events displaying invalid state (#7280)
* When no URL is provided to `ContentValidationState.collectMediaState`, assume it's valid That way we can do: `if (validationState.isValid() && state.collectMediaState(possiblyNullUrl).isValid()) ...` * Remove the `eventId` param from `ContentScannerService.scan` It's not really used, since we then provide a state that can be mutated, and fetching that is what the previous parameter was used for * Make sure to always validate the medias in the viewer, both the actual media and the thumbnail * Update screenshots --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
committed by
GitHub
parent
d8b01cf3e7
commit
0442fbd307
+1
-1
@@ -189,7 +189,7 @@ fun ContentValidationState.collectOverallState(): State<ContentValidationValue>
|
||||
@Composable
|
||||
fun ContentValidationState.collectMediaState(url: String?): State<ContentValidationValue> {
|
||||
if (url == null) {
|
||||
return remember { mutableStateOf(ContentValidationValue.Unknown) }
|
||||
return remember { mutableStateOf(ContentValidationValue.Valid) }
|
||||
}
|
||||
|
||||
return produceState(getCurrentMediaState(url), key1 = url) {
|
||||
|
||||
Reference in New Issue
Block a user