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)
Wed, Jul 3, 5:31 AM
Unknown Object (File)
Tue, Jul 2, 6:01 PM
Unknown Object (File)
Tue, Jul 2, 6:01 PM
Unknown Object (File)
Tue, Jul 2, 6:01 PM
Unknown Object (File)
Tue, Jul 2, 6:01 PM
Unknown Object (File)
Tue, Jul 2, 6:01 PM
Unknown Object (File)
Tue, Jul 2, 2:03 PM
Unknown Object (File)
Mon, Jul 1, 6:00 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.