fix(startup): stop offering Retry after a repair that needs a restart
A seed-and-restart repair writes the salvaged credentials straight to disk and leaves this process's store closed, because the plugin still holds the bad document in memory. repairCorruptStore says so plainly — "nothing may write a preference before that restart … the caller keeps the app on the failure screen precisely so nothing does" — but the caller did not. Clearing the repairing flag re-enabled Retry, and pressing it reopened onto the stale map, whose first write would flush it back over the seed and orphan every ciphertext token in the database. The repair hook returned a bare bool, which cannot express the difference between "retry now" and "never retry in this process", so replace it with StartupRepairResult. The restart case latches terminal state on the bootstrap, withdraws Retry and Repair rather than grey them out — a disabled control still invites another press — and says what to do instead, which nothing did: repairNeedsRestart was a dialog title with no body anywhere. Desktop gets a Quit button through the existing AppExitService seam; Copy and Upload stay live everywhere, because a stuck user still needs the diagnostic out. close #1732
This commit is contained in:
@@ -2893,6 +2893,12 @@ class Translations$startup$en {
|
||||
/// en: 'Storage repaired — restart required'
|
||||
String get repairNeedsRestart => 'Storage repaired — restart required';
|
||||
|
||||
/// en: 'Your data was repaired, but Plezy has to start fresh before it can use it. Close Plezy and open it again.'
|
||||
String get restartRequiredBody => 'Your data was repaired, but Plezy has to start fresh before it can use it. Close Plezy and open it again.';
|
||||
|
||||
/// en: 'Quit Plezy'
|
||||
String get quitPlezy => 'Quit Plezy';
|
||||
|
||||
/// en: 'Repair failed'
|
||||
String get repairFailed => 'Repair failed';
|
||||
|
||||
@@ -6934,6 +6940,8 @@ extension on Translations {
|
||||
'startup.repairConfirm' => 'Repair',
|
||||
'startup.repairSucceeded' => 'Storage repaired',
|
||||
'startup.repairNeedsRestart' => 'Storage repaired — restart required',
|
||||
'startup.restartRequiredBody' => 'Your data was repaired, but Plezy has to start fresh before it can use it. Close Plezy and open it again.',
|
||||
'startup.quitPlezy' => 'Quit Plezy',
|
||||
'startup.repairFailed' => 'Repair failed',
|
||||
'startup.repairKeptSignIns' => 'Your servers and profiles are still signed in.',
|
||||
'startup.repairLostSignIns' => 'The key protecting your saved sign-ins could not be recovered. You will have to sign in to every server and profile again.',
|
||||
@@ -7040,10 +7048,10 @@ extension on Translations {
|
||||
'explore.sourceMaterial.manga' => 'Manga',
|
||||
'explore.sourceMaterial.lightNovel' => 'Light novel',
|
||||
'explore.sourceMaterial.novel' => 'Novel',
|
||||
'explore.sourceMaterial.visualNovel' => 'Visual novel',
|
||||
'explore.sourceMaterial.game' => 'Game',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'explore.sourceMaterial.visualNovel' => 'Visual novel',
|
||||
'explore.sourceMaterial.game' => 'Game',
|
||||
'explore.sourceMaterial.webComic' => 'Web comic',
|
||||
'explore.sourceMaterial.musicRelease' => 'Music',
|
||||
'explore.sourceMaterial.otherMedia' => 'Other',
|
||||
@@ -7554,10 +7562,10 @@ extension on Translations {
|
||||
'externalPlayer.playInExternalPlayer' => 'Play in External Player',
|
||||
'metadataEdit.editMetadata' => 'Edit...',
|
||||
'metadataEdit.screenTitle' => 'Edit Metadata',
|
||||
'metadataEdit.basicInfo' => 'Basic Info',
|
||||
'metadataEdit.artwork' => 'Artwork',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'metadataEdit.basicInfo' => 'Basic Info',
|
||||
'metadataEdit.artwork' => 'Artwork',
|
||||
'metadataEdit.advancedSettings' => 'Advanced Settings',
|
||||
'metadataEdit.title' => 'Title',
|
||||
'metadataEdit.sortTitle' => 'Sort Title',
|
||||
|
||||
Reference in New Issue
Block a user