Adds muted state to channel list in sidebar (#6042)

* Sorting categories body in the observable

* Adds muted state to channel list in sidebar

* update snapshots

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Shaz Amjad <shaz.amjad@me.com>
This commit is contained in:
Shaz MJ
2022-03-12 00:13:05 +11:00
committed by GitHub
parent 86bd5c5072
commit eec536a61b
9 changed files with 59 additions and 7 deletions

View File

@@ -80,7 +80,13 @@ export default class CategoryModel extends Model implements CategoryInterface {
@lazy channels = this.collections.
get<ChannelModel>(CHANNEL).
query(
Q.on(CATEGORY_CHANNEL, 'category_id', this.id),
Q.experimentalJoinTables([MY_CHANNEL, CATEGORY_CHANNEL]),
Q.on(CATEGORY_CHANNEL,
Q.and(
Q.on(MY_CHANNEL, Q.where('id', Q.notEq(''))),
Q.where('category_id', this.id),
),
),
);
/** myChannels : Retrieves all myChannels that are part of this category */