Page MenuHomePhabricator

[lib] Create common logic for filtering available thread members actions
ClosedPublic

Authored by jacek on Mar 22 2022, 10:39 AM.
Tags
None
Referenced Files
F3378873: D3490.id10955.diff
Wed, Nov 27, 1:40 PM
Unknown Object (File)
Fri, Nov 8, 12:43 PM
Unknown Object (File)
Tue, Nov 5, 8:30 PM
Unknown Object (File)
Tue, Nov 5, 8:30 PM
Unknown Object (File)
Tue, Nov 5, 8:30 PM
Unknown Object (File)
Tue, Nov 5, 8:30 PM
Unknown Object (File)
Tue, Nov 5, 8:30 PM
Unknown Object (File)
Tue, Nov 5, 8:28 PM

Details

Summary

Moved logic responsible for filtering menu items in thread members panel into shared function between mobile and web.
No logic changes has been made in the shared function itself.

Test Plan

In web app, action menu in members modal contains the same elements as before. In mobile app, in thread settings, the same members options are avaliable.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
lib/shared/thread-utils.js
1327 ↗(On Diff #10598)

Can we use less general type (an enum)?

1347 ↗(On Diff #10598)
native/chat/settings/thread-settings-member.react.js
98 ↗(On Diff #10598)

In the new function we have one more condition here: threadHasAdminRole(threadInfo) - but this probably should be here from the beginning

This revision is now accepted and ready to land.Mar 23 2022, 5:12 AM

Rebase & fixes after review