Detect database corruption consistently

This commit is contained in:
Fedor Indutny 2021-09-08 13:39:14 -07:00 committed by GitHub
parent 1184098b42
commit 7510be0caf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 106 additions and 77 deletions

View file

@ -84,6 +84,7 @@ export type IPCEventsCallbacksType = {
addCustomColor: (customColor: CustomColorType) => void;
addDarkOverlay: () => void;
deleteAllData: () => Promise<void>;
closeDB: () => Promise<void>;
editCustomColor: (colorId: string, customColor: CustomColorType) => void;
getConversationsWithCustomColor: (x: string) => Array<ConversationType>;
installStickerPack: (packId: string, key: string) => Promise<void>;
@ -383,6 +384,10 @@ export function createIPCEvents(
renderClearingDataView();
},
closeDB: async () => {
await window.sqlInitializer.goBackToMainProcess();
},
showStickerPack: (packId, key) => {
// We can get these events even if the user has never linked this instance.
if (!window.Signal.Util.Registration.everDone()) {