Apply suggestions from review
This commit is contained in:
parent
76040c652c
commit
517e8951ee
2 changed files with 5 additions and 7 deletions
|
@ -145,7 +145,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const lists = RoomListStore.instance.unfilteredLists;
|
const lists = RoomListStore.instance.unfilteredLists;
|
||||||
TAG_ORDER.every(t => {
|
for (let i = 0; i < TAG_ORDER.length; i++) {
|
||||||
|
const t = TAG_ORDER[i];
|
||||||
const listRooms = lists[t];
|
const listRooms = lists[t];
|
||||||
const unreadRoom = listRooms.find((r: Room) => {
|
const unreadRoom = listRooms.find((r: Room) => {
|
||||||
if (this.showInHomeSpace(r)) {
|
if (this.showInHomeSpace(r)) {
|
||||||
|
@ -159,10 +160,9 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
room_id: unreadRoom.roomId,
|
room_id: unreadRoom.roomId,
|
||||||
context_switch: true,
|
context_switch: true,
|
||||||
});
|
});
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ limitations under the License.
|
||||||
|
|
||||||
import { NotificationColor } from "./NotificationColor";
|
import { NotificationColor } from "./NotificationColor";
|
||||||
import { NotificationState } from "./NotificationState";
|
import { NotificationState } from "./NotificationState";
|
||||||
import { RoomNotificationState } from "./RoomNotificationState";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summarizes a number of states into a unique snapshot. To populate, call
|
* Summarizes a number of states into a unique snapshot. To populate, call
|
||||||
|
@ -26,7 +25,6 @@ import { RoomNotificationState } from "./RoomNotificationState";
|
||||||
*/
|
*/
|
||||||
export class SummarizedNotificationState extends NotificationState {
|
export class SummarizedNotificationState extends NotificationState {
|
||||||
private totalStatesWithUnread = 0;
|
private totalStatesWithUnread = 0;
|
||||||
private unreadRoomId: string;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
@ -47,7 +45,7 @@ export class SummarizedNotificationState extends NotificationState {
|
||||||
* @param includeSymbol If true, the notification state's symbol will be taken if one
|
* @param includeSymbol If true, the notification state's symbol will be taken if one
|
||||||
* is present.
|
* is present.
|
||||||
*/
|
*/
|
||||||
public add(other: RoomNotificationState, includeSymbol = false) {
|
public add(other: NotificationState, includeSymbol = false) {
|
||||||
if (other.symbol && includeSymbol) {
|
if (other.symbol && includeSymbol) {
|
||||||
this._symbol = other.symbol;
|
this._symbol = other.symbol;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue