Fix fav
This commit is contained in:
parent
f67a4010bc
commit
7beaa62003
|
@ -392,6 +392,7 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
|
||||||
let observable;
|
let observable;
|
||||||
|
|
||||||
const defaultWhereClause = [Q.where('archived', false), Q.where('open', true)] as (Q.WhereDescription | Q.SortBy)[];
|
const defaultWhereClause = [Q.where('archived', false), Q.where('open', true)] as (Q.WhereDescription | Q.SortBy)[];
|
||||||
|
const observeColumns = ['alert', 'f', 'on_hold', 'room_updated_at'];
|
||||||
|
|
||||||
if (sortBy === SortBy.Alphabetical) {
|
if (sortBy === SortBy.Alphabetical) {
|
||||||
defaultWhereClause.push(Q.experimentalSortBy(`${this.useRealName ? 'fname' : 'name'}`, Q.asc));
|
defaultWhereClause.push(Q.experimentalSortBy(`${this.useRealName ? 'fname' : 'name'}`, Q.asc));
|
||||||
|
@ -404,14 +405,14 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
|
||||||
observable = await db
|
observable = await db
|
||||||
.get('subscriptions')
|
.get('subscriptions')
|
||||||
.query(...defaultWhereClause)
|
.query(...defaultWhereClause)
|
||||||
.observeWithColumns(['alert', 'on_hold', 'room_updated_at']);
|
.observeWithColumns(observeColumns);
|
||||||
// When we're NOT grouping
|
// When we're NOT grouping
|
||||||
} else {
|
} else {
|
||||||
this.count += QUERY_SIZE;
|
this.count += QUERY_SIZE;
|
||||||
observable = await db
|
observable = await db
|
||||||
.get('subscriptions')
|
.get('subscriptions')
|
||||||
.query(...defaultWhereClause, Q.experimentalSkip(0), Q.experimentalTake(this.count))
|
.query(...defaultWhereClause, Q.experimentalSkip(0), Q.experimentalTake(this.count))
|
||||||
.observeWithColumns(['alert', 'on_hold', 'room_updated_at']);
|
.observeWithColumns(observeColumns);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.querySubscription = observable.subscribe(data => {
|
this.querySubscription = observable.subscribe(data => {
|
||||||
|
|
Loading…
Reference in New Issue