parent
faea93e5ce
commit
606103be8d
4 changed files with 19 additions and 5 deletions
|
@ -52,7 +52,10 @@ function getToast(toastType: ToastType): AnyToast {
|
|||
case ToastType.ConversationArchived:
|
||||
return {
|
||||
toastType: ToastType.ConversationArchived,
|
||||
parameters: { conversationId: 'some-conversation-id' },
|
||||
parameters: {
|
||||
conversationId: 'some-conversation-id',
|
||||
wasPinned: false,
|
||||
},
|
||||
};
|
||||
case ToastType.ConversationMarkedUnread:
|
||||
return { toastType: ToastType.ConversationMarkedUnread };
|
||||
|
|
|
@ -23,7 +23,10 @@ export type PropsType = {
|
|||
openFileInFolder: (target: string) => unknown;
|
||||
OS: string;
|
||||
onShowDebugLog: () => unknown;
|
||||
onUndoArchive: (conversaetionId: string) => unknown;
|
||||
onUndoArchive: (
|
||||
conversationId: string,
|
||||
options?: { wasPinned?: boolean }
|
||||
) => unknown;
|
||||
toast?: AnyToast;
|
||||
megaphone?: AnyActionableMegaphone;
|
||||
centerToast?: boolean;
|
||||
|
@ -166,7 +169,9 @@ export function renderToast({
|
|||
toastAction={{
|
||||
label: i18n('icu:conversationArchivedUndo'),
|
||||
onClick: () => {
|
||||
onUndoArchive(String(toast.parameters.conversationId));
|
||||
onUndoArchive(String(toast.parameters.conversationId), {
|
||||
wasPinned: toast.parameters.wasPinned,
|
||||
});
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue