burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.07k stars 981 forks source link

Fix clearing redo stack after brush drawing #553

Closed wasky closed 1 month ago

wasky commented 1 month ago

As discussed in https://github.com/burhanrashid52/PhotoEditor/pull/545#discussion_r1499095552, when drawing a new shape, the redo history should be cleared. #545 invokes PhotoEditorViewState.clearRedoViews() only when adding sticker, emoji or text. However, for brush drawing, the function is not invoked, leading to an incorrect value being returned by PhotoEditorViewState.redoViewsCount.

wasky commented 1 month ago

@burhanrashid52 Can you manually rerun tests? Test failed because of emulator timeout.

burhanrashid52 commented 1 month ago

@wasky Can you please rebase it from latest master so that we can have the CI fix in this PR ?