Improved windows notifications
This commit is contained in:
parent
584e39d569
commit
40c21b1666
31 changed files with 1227 additions and 151 deletions
|
@ -43,6 +43,8 @@ import { lookupConversationWithoutUuid } from './lookupConversationWithoutUuid';
|
|||
import * as log from '../logging/log';
|
||||
import { deleteAllMyStories } from './deleteAllMyStories';
|
||||
import { isEnabled } from '../RemoteConfig';
|
||||
import type { NotificationClickData } from '../services/notifications';
|
||||
import { StoryViewModeType, StoryViewTargetType } from '../types/Stories';
|
||||
|
||||
type SentMediaQualityType = 'standard' | 'high';
|
||||
type ThemeType = 'light' | 'dark' | 'system';
|
||||
|
@ -115,6 +117,7 @@ export type IPCEventsCallbacksType = {
|
|||
removeDarkOverlay: () => void;
|
||||
resetAllChatColors: () => void;
|
||||
resetDefaultChatColor: () => void;
|
||||
showConversationViaNotification: (data: NotificationClickData) => void;
|
||||
showConversationViaSignalDotMe: (hash: string) => Promise<void>;
|
||||
showKeyboardShortcuts: () => void;
|
||||
showGroupViaLink: (x: string) => Promise<void>;
|
||||
|
@ -510,6 +513,29 @@ export function createIPCEvents(
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
showConversationViaNotification({
|
||||
conversationId,
|
||||
messageId,
|
||||
storyId,
|
||||
}: NotificationClickData) {
|
||||
if (conversationId) {
|
||||
if (storyId) {
|
||||
window.reduxActions.stories.viewStory({
|
||||
storyId,
|
||||
storyViewMode: StoryViewModeType.Single,
|
||||
viewTarget: StoryViewTargetType.Replies,
|
||||
});
|
||||
} else {
|
||||
window.reduxActions.conversations.showConversation({
|
||||
conversationId,
|
||||
messageId,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
window.reduxActions.app.openInbox();
|
||||
}
|
||||
},
|
||||
async showConversationViaSignalDotMe(hash: string) {
|
||||
if (!Registration.everDone()) {
|
||||
log.info(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue