add datalist for object categories
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
selectedChat,
|
||||
senderName,
|
||||
updateMailbox,
|
||||
usedObjectCategories,
|
||||
} from "../Model/model";
|
||||
import { decryptString, encryptString } from "../cryptUtility";
|
||||
|
||||
@@ -348,6 +349,10 @@ export class Chat {
|
||||
} else {
|
||||
this.objects.set(messageObject.id, messageObject);
|
||||
}
|
||||
|
||||
const latest = this.getMostRecentContent(messageObject);
|
||||
if (!latest || !latest.categoryName) return;
|
||||
usedObjectCategories.add(latest.categoryName);
|
||||
};
|
||||
|
||||
addObjectAndSend = (messageObject: MessageObject): void => {
|
||||
|
||||
@@ -157,6 +157,9 @@ export function zoomIn() {
|
||||
pageZoom.value += zoomStep;
|
||||
}
|
||||
|
||||
export const usedObjectCategories =
|
||||
React.restoreListState<string>("object-categories");
|
||||
|
||||
// CHAT
|
||||
export const chats = new React.ListState<Chat>();
|
||||
export const chatIds = React.restoreListState<string>("chat-ids");
|
||||
|
||||
Reference in New Issue
Block a user