HomePhabricator
Diffusion Comm 032d0d7fc9a1

[native] Add alert when exiting edit mode by clicking the exit button

Description

[native] Add alert when exiting edit mode by clicking the exit button

Summary: We want to make sure, that the user wanted to close the editing panel. Created a discard edited changes modal. It displays only if there are some changes in the message.

Test Plan:
Run the app on iOS.

  1. Selected message to edit. Edited it. Pressed exit edit mode button. The alert appears.
  2. Checked if the alert only appears if there are some changes in the message.
  3. Checked if in both scenarios we restore the message draft after exiting edit mode.

Screenshot 2023-04-12 at 14.57.07.png (374×1 px, 227 KB)

Reviewers: michal, inka, ginsu

Reviewed By: inka

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7349