forked from Ivasoft/mattermost-mobile
[Gekidou MM-45506] Do not include empty DM and GMs in Channel List (#6630)
This commit is contained in:
@@ -436,6 +436,16 @@ export const queryMyChannelUnreads = (database: Database, currentTeamId: string)
|
||||
);
|
||||
};
|
||||
|
||||
export const queryEmptyDirectAndGroupChannels = (database: Database) => {
|
||||
return database.get<MyChannelModel>(MY_CHANNEL).query(
|
||||
Q.on(
|
||||
CHANNEL,
|
||||
Q.where('team_id', Q.eq('')),
|
||||
),
|
||||
Q.where('last_post_at', Q.eq(0)),
|
||||
);
|
||||
};
|
||||
|
||||
export function observeMyChannelMentionCount(database: Database, teamId?: string, columns = ['mentions_count', 'is_unread']): Observable<number> {
|
||||
const conditions: Q.Condition[] = [
|
||||
Q.where('delete_at', Q.eq(0)),
|
||||
|
||||
Reference in New Issue
Block a user