Prevent PhotoViewer share/copy while loading

This commit prevents the share and copy actions in the PhotoViewer
from being triggered if the content is still loading.
This commit is contained in:
2025-08-19 22:58:13 +03:00
parent 252f6ec21e
commit 22e8a5c09e
@@ -79,6 +79,8 @@ class PhotoViewViewModelImpl(
}
override fun onShareClicked() {
if (screenState.value.isLoading) return
val url = screenState.value.images
.getOrNull(screenState.value.selectedPage)
?.extractUrl() ?: return
@@ -137,6 +139,8 @@ class PhotoViewViewModelImpl(
}
override fun onCopyClicked() {
if (screenState.value.isLoading) return
val clipboardManager =
applicationContext.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager