fix(app): failure toasts are announced at once
Shell.Notify takes isError; every toast that reports a failure or a refusal sets it (archive actions and fixes, sync, settings import and cache, proxy fetch, welcome folder check, card check, erase, format and eject). The Uploader marks its unexpected-error, sign-out and choose-a-sequence toasts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
9 files changed
+27
-20
No files matched your search
@@ -177,7 +177,7 @@ public sealed class ImportResultViewModel : LocalizedViewModel
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or DatabaseException)
|
||||
{
|
||||
Log.Warning("import", "Card check failed", ex);
|
||||
_shell.Notify(Loc.L("Import.Toast.CheckFailed"), ex.Message);
|
||||
_shell.Notify(Loc.L("Import.Toast.CheckFailed"), ex.Message, isError: true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -212,7 +212,7 @@ public sealed class ImportResultViewModel : LocalizedViewModel
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
Log.Warning("import", "Deleting imported photos failed", ex);
|
||||
_shell.Notify(Loc.L("Import.Toast.DeleteFailed"), ex.Message);
|
||||
_shell.Notify(Loc.L("Import.Toast.DeleteFailed"), ex.Message, isError: true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -263,12 +263,12 @@ public sealed class ImportResultViewModel : LocalizedViewModel
|
||||
if (!unchanged)
|
||||
{
|
||||
Actions = _actions with { Erase = null, Card = null };
|
||||
_shell.Notify(Loc.L("Import.Toast.CardChanged", name), Loc.L("Import.Blocked.NoDryRun"));
|
||||
_shell.Notify(Loc.L("Import.Toast.CardChanged", name), Loc.L("Import.Blocked.NoDryRun"), isError: true);
|
||||
return;
|
||||
}
|
||||
var outcome = _shell.Services.Devices.Format(device);
|
||||
if (outcome == FormatOutcome.Formatted) Actions = _actions with { Erase = null, Card = null };
|
||||
if (outcome != FormatOutcome.Cancelled) _shell.Notify(Loc.L("Import.Toast.Format." + outcome, name));
|
||||
if (outcome != FormatOutcome.Cancelled) _shell.Notify(Loc.L("Import.Toast.Format." + outcome, name), isError: outcome == FormatOutcome.Failed);
|
||||
}
|
||||
|
||||
/// <summary>The first files that were never imported, one per line.</summary>
|
||||
@@ -286,7 +286,7 @@ public sealed class ImportResultViewModel : LocalizedViewModel
|
||||
try
|
||||
{
|
||||
var outcome = await Task.Run(() => _shell.Services.Devices.Eject(device));
|
||||
_shell.Notify(Loc.L("Import.Toast.Eject." + outcome, _card?.Nickname ?? device.Label));
|
||||
_shell.Notify(Loc.L("Import.Toast.Eject." + outcome, _card?.Nickname ?? device.Label), isError: outcome != EjectOutcome.Ejected);
|
||||
if (outcome == EjectOutcome.Ejected) SetDevice(null);
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in new issue
Block a user