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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user