add type annotations, improve ui
This commit is contained in:
@@ -88,7 +88,8 @@ export default class ChatListViewModel {
|
||||
loadChats = (): void => {
|
||||
this.chatViewModels.clear();
|
||||
for (const chatModel of this.coreViewModel.chatListModel.chatModels.values()) {
|
||||
const chatViewModel = this.createChatViewModel(chatModel);
|
||||
const chatViewModel: ChatViewModel =
|
||||
this.createChatViewModel(chatModel);
|
||||
this.trackChat(chatViewModel);
|
||||
}
|
||||
this.updateIndices();
|
||||
|
||||
@@ -138,7 +138,7 @@ export default class ChatMessageViewModel {
|
||||
return;
|
||||
}
|
||||
|
||||
let count = 0;
|
||||
let count: number = 0;
|
||||
switch (content) {
|
||||
case ReactionSymbols.ThumbsUp: {
|
||||
count = this.reactionsThumbsUpCount.value;
|
||||
|
||||
@@ -210,7 +210,9 @@ export default class ChatViewModel extends ContextHost<ChatPageTypes> {
|
||||
);
|
||||
|
||||
// context
|
||||
this.chatListViewModel.selectedChat.subscribeSilent(this.updateContexts);
|
||||
this.chatListViewModel.selectedChat.subscribeSilent(
|
||||
this.updateContexts,
|
||||
);
|
||||
this.selectedPage.subscribeSilent(this.updateContexts);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user