Page MenuHomePhabricator

[native] Blocking navigation in edit mode in the TabRouter
ClosedPublic

Authored by kuba on Jun 23 2023, 2:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 7:27 AM
Unknown Object (File)
Wed, Apr 24, 7:27 AM
Unknown Object (File)
Wed, Apr 24, 7:27 AM
Unknown Object (File)
Wed, Apr 24, 7:27 AM
Unknown Object (File)
Wed, Apr 24, 7:27 AM
Unknown Object (File)
Wed, Apr 24, 7:20 AM
Unknown Object (File)
Mar 8 2024, 8:22 AM
Unknown Object (File)
Mar 7 2024, 9:10 PM
Subscribers
None

Details

Summary

When we are in edit mode and the user made changes, we prevent him in this diff from changing tabs.

Test Plan

On iOS:

  • Navigate between threads - check if everything works.
  • Navigate between tabs - check if everything works.
  • Enter edit mode and make changes to the message,
  • Change tab - should confirm with alert.
  • Do the same in the sidebar (enter edit mode and check if the alert displays).

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kuba edited the summary of this revision. (Show Details)
kuba added inline comments.
native/navigation/nav-selectors.js
340–347 ↗(On Diff #28035)

I split it into two functions to reuse it in the new router.

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 23 2023, 3:04 AM
Harbormaster failed remote builds in B20453: Diff 28035!

Rebase & fix calling dispatch from reducer

This revision is now accepted and ready to land.Jun 27 2023, 8:05 PM