Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrlzy committed Sep 5, 2024
1 parent 3ff5299 commit 495325b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ class GalleryUpliftFragment : Fragment() {
}
}

is GallerySideEffect.DeleteResource -> deleteResource(pos)

is GallerySideEffect.DisplayStorageException ->
displayStorageException(
label = label,
Expand Down Expand Up @@ -342,16 +340,6 @@ class GalleryUpliftFragment : Fragment() {
openIntentChooser(resourcePath, Intent.ACTION_VIEW, true)
}

private fun deleteResource(pos: Int) {
binding.viewPager.apply {
setPageTransformer(null)
pagerAdapter.notifyItemRemoved(pos)
doOnNextLayout {
setPageTransformer(DepthPageTransformer())
}
}
}

private fun displayStorageException(label: String, msg: String) {
StorageExceptionDialogFragment.newInstance(label, msg).show(
childFragmentManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ sealed class GallerySideEffect {
data class ScrollToPage(val pos: Int) : GallerySideEffect()
data object NotifyResourceScoresChanged : GallerySideEffect()
data object NavigateBack : GallerySideEffect()
data class DeleteResource(val pos: Int) : GallerySideEffect()
data class ToastIndexFailedPath(val path: Path) : GallerySideEffect()
data class ShowInfoAlert(
val path: Path,
Expand Down

0 comments on commit 495325b

Please sign in to comment.