feat: Add image viewer state management to disable swipe-back when photo is fullscreen
This commit is contained in:
@@ -114,7 +114,8 @@ fun ChatDetailScreen(
|
||||
currentUserPrivateKey: String,
|
||||
totalUnreadFromOthers: Int = 0,
|
||||
isDarkTheme: Boolean,
|
||||
avatarRepository: AvatarRepository? = null
|
||||
avatarRepository: AvatarRepository? = null,
|
||||
onImageViewerChanged: (Boolean) -> Unit = {}
|
||||
) {
|
||||
val viewModel: ChatViewModel = viewModel(key = "chat_${user.publicKey}")
|
||||
val context = LocalContext.current
|
||||
@@ -1813,6 +1814,7 @@ fun ChatDetailScreen(
|
||||
imageViewerInitialIndex = findImageIndex(allImages, attachmentId)
|
||||
imageViewerSourceBounds = bounds
|
||||
showImageViewer = true
|
||||
onImageViewerChanged(true)
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -1886,6 +1888,7 @@ fun ChatDetailScreen(
|
||||
onDismiss = {
|
||||
showImageViewer = false
|
||||
imageViewerSourceBounds = null
|
||||
onImageViewerChanged(false)
|
||||
},
|
||||
onClosingStart = {
|
||||
// Сразу сбрасываем status bar при начале закрытия (до анимации)
|
||||
|
||||
Reference in New Issue
Block a user