add type annotations, improve ui

This commit is contained in:
marlon-erler
2026-04-13 11:23:17 +00:00
parent 537592fae9
commit 6dff4a74eb
21 changed files with 100 additions and 57 deletions
@@ -13,7 +13,8 @@ export default class NotificationViewModel {
// main
showNotification = (message: ChatMessage): void => {
const notification = NotificationViewModel.createNotification(message);
const notification: Notification =
NotificationViewModel.createNotification(message);
if (this.seenMessageIds.has(message.id)) return;
const currentChat =
@@ -32,7 +33,7 @@ export default class NotificationViewModel {
};
openNotification = () => {
const notification = this.marquee.value;
const notification: Notification = this.marquee.value;
if (notification == undefined) return;
const chat = [
@@ -51,7 +52,7 @@ export default class NotificationViewModel {
return this.stopLoop();
}
const notification = this.messagesInMarquee.shift();
const notification: Notification = this.messagesInMarquee.shift();
this.seenMessageIds.delete(notification.messageId);
this.marquee.value = notification;
};