Page MenuHomePhabricator

[web, native] Introduce and use `ThreadIsChannel` function
ClosedPublic

Authored by jacek on Feb 22 2022, 4:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 12:32 PM
Unknown Object (File)
Sat, Nov 2, 6:37 AM
Unknown Object (File)
Sat, Nov 2, 6:37 AM
Unknown Object (File)
Sat, Nov 2, 6:37 AM
Unknown Object (File)
Sat, Nov 2, 6:36 AM
Unknown Object (File)
Sat, Nov 2, 6:35 AM
Unknown Object (File)
Sat, Nov 2, 6:16 AM
Unknown Object (File)
Oct 7 2024, 2:57 AM

Details

Summary

Introduce helper function as a follow-up of D3191, that simplifies logic for conditionally displaying Subchannels menu item.

Depends on D3191

Test Plan

Tested web and mobile app. Subchannels menu seems to work in the same way as before.

Diff Detail

Repository
rCOMM Comm
Branch
jacek/subchannel-logic
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested changes to this revision.Feb 22 2022, 5:30 AM
tomek added inline comments.
lib/shared/thread-utils.js
146–147 ↗(On Diff #9805)

We should use threadIsChannel here

This revision now requires changes to proceed.Feb 22 2022, 5:30 AM

Used the function following Tomek's suggestion

tomek added inline comments.
lib/shared/thread-utils.js
144

Both threadInChatList and threadIsChannel return boolean so double negation is not necessary

This revision is now accepted and ready to land.Feb 23 2022, 3:15 AM
This revision now requires review to proceed.Feb 23 2022, 3:15 AM

I think there are several more places where this could be used... for instance, here. To find those places it might be useful to run git grep '== threadTypes.SIDEBAR'. That said, it's probably outside the scope of this diff.

This revision is now accepted and ready to land.Feb 23 2022, 11:23 AM