Skip to content

Commit

Permalink
Fix return value of undo() and redo() methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
VardanTitan authored and burhanrashid52 committed Feb 28, 2024
1 parent e3a91a6 commit 685c82b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal class GraphicManager(
mViewState.addedViewsCount - 1
)
if (removeView is DrawingView) {
return removeView.undo()
return removeView.undo() || (mViewState.addedViewsCount != 0)
} else {
mViewState.removeAddedView(mViewState.addedViewsCount - 1)
mPhotoEditorView.removeView(removeView)
Expand All @@ -75,7 +75,7 @@ internal class GraphicManager(
mViewState.redoViewsCount - 1
)
if (redoView is DrawingView) {
return redoView.redo()
return redoView.redo() && (mViewState.redoViewsCount != 0)
} else {
mViewState.popRedoView()
mPhotoEditorView.addView(redoView)
Expand Down

0 comments on commit 685c82b

Please sign in to comment.