You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: feature/main/src/main/java/ru/tech/imageresizershrinker/feature/main/presentation/components/MainTopAppBar.kt
Copy file name to clipboardexpand all lines: feature/media-picker/src/main/java/ru/tech/imageresizershrinker/feature/media_picker/presentation/components/MediaImagePager.kt
Copy file name to clipboardexpand all lines: feature/media-picker/src/main/java/ru/tech/imageresizershrinker/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt
+12-10
Original file line number
Diff line number
Diff line change
@@ -230,15 +230,17 @@ internal fun ColumnScope.MediaPickerGridWithOverlays(
230
230
}
231
231
}
232
232
}
233
-
val visible = mediaState.isLoading || filteredMediaState.isLoading
233
+
234
+
val isHaveNoData = mediaState.media.isEmpty() &&!mediaState.isLoading
235
+
val showLoading = (mediaState.isLoading || filteredMediaState.isLoading) &&!isHaveNoData
234
236
235
237
val backgroundColor by animateColorAsState(
236
238
MaterialTheme.colorScheme.scrim.copy(
237
-
if (visible&& filteredMediaState.media.isNotEmpty()) 0.5felse0f
239
+
if (showLoading&& filteredMediaState.media.isNotEmpty()) 0.5felse0f
238
240
)
239
241
)
240
242
BoxAnimatedVisibility(
241
-
visible =visible,
243
+
visible =showLoading,
242
244
modifier =Modifier
243
245
.fillMaxSize()
244
246
.imePadding()
@@ -250,13 +252,13 @@ internal fun ColumnScope.MediaPickerGridWithOverlays(
250
252
modifier =Modifier
251
253
.fillMaxSize()
252
254
.padding(
253
-
start =WindowInsets.Companion.displayCutout
255
+
start =WindowInsets.displayCutout
254
256
.asPaddingValues()
255
257
.calculateStartPadding(layoutDirection),
256
-
end =WindowInsets.Companion.displayCutout
258
+
end =WindowInsets.displayCutout
257
259
.asPaddingValues()
258
260
.calculateEndPadding(layoutDirection),
259
-
bottom =WindowInsets.Companion.navigationBars
261
+
bottom =WindowInsets.navigationBars
260
262
.asPaddingValues()
261
263
.calculateBottomPadding()
262
264
),
@@ -304,7 +306,7 @@ internal fun ColumnScope.MediaPickerGridWithOverlays(
0 commit comments