Show universal timer notification in open conversation
This commit is contained in:
parent
672d060172
commit
972a4cba0c
1 changed files with 14 additions and 0 deletions
|
@ -534,11 +534,25 @@ export async function startApp(): Promise<void> {
|
||||||
newValue: number | undefined
|
newValue: number | undefined
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
await universalExpireTimer.set(newValue);
|
await universalExpireTimer.set(newValue);
|
||||||
|
|
||||||
|
// Update account in Storage Service
|
||||||
const conversationId = window.ConversationController.getOurConversationIdOrThrow();
|
const conversationId = window.ConversationController.getOurConversationIdOrThrow();
|
||||||
const account = window.ConversationController.get(conversationId);
|
const account = window.ConversationController.get(conversationId);
|
||||||
assert(account, "Account wasn't found");
|
assert(account, "Account wasn't found");
|
||||||
|
|
||||||
account.captureChange('universalExpireTimer');
|
account.captureChange('universalExpireTimer');
|
||||||
|
|
||||||
|
// Add a notification to the currently open conversation
|
||||||
|
const state = window.reduxStore.getState();
|
||||||
|
const selectedId = state.conversations.selectedConversationId;
|
||||||
|
if (selectedId) {
|
||||||
|
const conversation = window.ConversationController.get(selectedId);
|
||||||
|
assert(conversation, "Conversation wasn't found");
|
||||||
|
|
||||||
|
conversation.queueJob('maybeSetPendingUniversalTimer', () =>
|
||||||
|
conversation.maybeSetPendingUniversalTimer()
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addDarkOverlay: () => {
|
addDarkOverlay: () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue