Improved windows notifications

This commit is contained in:
Scott Nonnenberg 2023-08-01 09:06:29 -07:00 committed by GitHub
parent 584e39d569
commit 40c21b1666
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 1227 additions and 151 deletions

View file

@ -167,7 +167,6 @@ import { SeenStatus } from './MessageSeenStatus';
import MessageSender from './textsecure/SendMessage';
import type AccountManager from './textsecure/AccountManager';
import { onStoryRecipientUpdate } from './util/onStoryRecipientUpdate';
import { StoryViewModeType, StoryViewTargetType } from './types/Stories';
import { downloadOnboardingStory } from './util/downloadOnboardingStory';
import { flushAttachmentDownloadQueue } from './util/attachmentDownloadQueue';
import { StartupQueue } from './util/StartupQueue';
@ -1540,27 +1539,6 @@ export async function startApp(): Promise<void> {
activeWindowService.registerForActive(() => notificationService.clear());
window.addEventListener('unload', () => notificationService.fastClear());
notificationService.on('click', (id, messageId, storyId) => {
window.IPC.showWindow();
if (id) {
if (storyId) {
window.reduxActions.stories.viewStory({
storyId,
storyViewMode: StoryViewModeType.Single,
viewTarget: StoryViewTargetType.Replies,
});
} else {
window.reduxActions.conversations.showConversation({
conversationId: id,
messageId,
});
}
} else {
window.reduxActions.app.openInbox();
}
});
// Maybe refresh remote configuration when we become active
activeWindowService.registerForActive(async () => {
strictAssert(server !== undefined, 'WebAPI not ready');