Page MenuHomePhabricator

[lib][web][native] Simplify logout call
ClosedPublic

Authored by inka on Dec 11 2023, 9:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 9:49 AM
Unknown Object (File)
Thu, Nov 7, 11:19 PM
Unknown Object (File)
Oct 17 2024, 3:44 AM
Unknown Object (File)
Oct 17 2024, 3:44 AM
Unknown Object (File)
Oct 17 2024, 3:44 AM
Unknown Object (File)
Oct 17 2024, 3:44 AM
Unknown Object (File)
Oct 17 2024, 3:44 AM
Unknown Object (File)
Oct 6 2024, 9:52 AM
Subscribers

Details

Summary

Now that actions are wrapped in hooks we can select data in them. This simplfies the calling code and reduces repetition.

Test Plan

Checked that it is possible to log out and back in with no errors showing up. Checked that invalidSessionDowngrade works correctly (by loggin out and back in before logoutActionTypes.success was dispatched)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Dec 11 2023, 10:18 AM

thanks for adding me as a reviewer! lgtm, but going to let someone else with more react expertise take a look

tomek added inline comments.
lib/actions/user-actions.js
102 ↗(On Diff #34480)

How about renaming it to e.g. const callKeyserverLogOut = useKeyserverCall(logOut);

This revision is now accepted and ready to land.Dec 12 2023, 12:22 AM
This revision was automatically updated to reflect the committed changes.