Merge delete for me/everyone into one modal

This commit is contained in:
Jamie Kyle 2023-04-10 14:38:34 -07:00 committed by GitHub
parent c956c0e025
commit 822b162136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 658 additions and 672 deletions

View file

@ -28,7 +28,7 @@ import { PanelRow } from './conversation/conversation-details/PanelRow';
import type { ProfileDataType } from '../state/ducks/conversations';
import { UsernameEditState } from '../state/ducks/usernameEnums';
import { ToastType } from '../types/Toast';
import type { ShowToastActionCreatorType } from '../state/ducks/toast';
import type { ShowToastAction } from '../state/ducks/toast';
import { getEmojiData, unifiedToEmoji } from './emoji/lib';
import { assertDev } from '../util/assert';
import { missingCaseError } from '../util/missingCaseError';
@ -85,7 +85,7 @@ type PropsActionType = {
saveAvatarToDisk: SaveAvatarToDiskActionType;
setUsernameEditState: (editState: UsernameEditState) => void;
deleteUsername: () => void;
showToast: ShowToastActionCreatorType;
showToast: ShowToastAction;
openUsernameReservationModal: () => void;
};
@ -525,7 +525,7 @@ export function ProfileEditor({
'Should not be visible without username'
);
void window.navigator.clipboard.writeText(username);
showToast(ToastType.CopiedUsername);
showToast({ toastType: ToastType.CopiedUsername });
},
},
{
@ -540,7 +540,7 @@ export function ProfileEditor({
void window.navigator.clipboard.writeText(
generateUsernameLink(username)
);
showToast(ToastType.CopiedUsernameLink);
showToast({ toastType: ToastType.CopiedUsernameLink });
},
},
{