Skip to content
Snippets Groups Projects
Commit 2a52b395 authored by RMidhunSuresh's avatar RMidhunSuresh
Browse files

Add explaining comments

parent 5c58b435
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ export class RootViewModel extends ViewModel {
this._client = new Client(this.platform);
this._setupNavigation();
this._messageFromParent.on("maximize", () => this._showTimeline(Promise.resolve()));
// Chatterbox can be minimized via the start button on the parent page!
this._messageFromParent.on("minimize", () => this.minimizeChatterbox());
}
......@@ -97,6 +98,11 @@ export class RootViewModel extends ViewModel {
const newCount = room.notificationCount;
if (newCount !== previousCount) {
if (!room.isUnread && newCount !== 0) {
/*
when chatterbox is maximized and there are previous unread messages,
this condition is hit but we still want to send the notification count so that
the badge zeroes out.
*/
room.clearUnread();
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment