浏览代码

Merge pull request #11593 from nextcloud/fixOrientationCrash

Fix crash when changing orientation when bottom sheet dialog in preview image is open
Andy Scherzinger 1 年之前
父节点
当前提交
1c2c5a33c0

二进制
app/screenshots/gplay/debug/com.nextcloud.client.ActivitiesActivityIT_openDrawer.png


二进制
app/screenshots/gplay/debug/com.nextcloud.client.FileDisplayActivityScreenshotIT_drawer.png


二进制
app/screenshots/gplay/debug/com.nextcloud.client.UploadListActivityActivityIT_openDrawer.png


+ 2 - 2
app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt

@@ -59,7 +59,7 @@ import com.owncloud.android.utils.DisplayUtils.AvatarGenerationListener
 import com.owncloud.android.utils.theme.ViewThemeUtils
 import javax.inject.Inject
 
-class FileActionsBottomSheet private constructor() : BottomSheetDialogFragment(), Injectable {
+class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable {
 
     @Inject
     lateinit var viewThemeUtils: ViewThemeUtils
@@ -189,7 +189,7 @@ class FileActionsBottomSheet private constructor() : BottomSheetDialogFragment()
         if (state is FileActionsViewModel.UiState.Loading) {
             binding.bottomSheetLoading.isVisible = true
             binding.bottomSheetContent.isVisible = false
-            viewThemeUtils.platform.colorCircularProgressBar(binding.bottomSheetLoading)
+            viewThemeUtils.platform.colorCircularProgressBar(binding.bottomSheetLoading, ColorRole.PRIMARY)
         } else {
             binding.bottomSheetLoading.isVisible = false
             binding.bottomSheetContent.isVisible = true