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)
Tue, May 7, 9:45 AM
Unknown Object (File)
Tue, May 7, 9:45 AM
Unknown Object (File)
Tue, May 7, 9:45 AM
Unknown Object (File)
Tue, May 7, 9:45 AM
Unknown Object (File)
Mon, May 6, 9:33 PM
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
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
Branch
kuba/blocking-navigation
Lint
No Lint Coverage
Unit
No Test Coverage

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