diff --git a/src/Titano.App/Library/LibraryActions.cs b/src/Titano.App/Library/LibraryActions.cs
index 8c76997d..13b70ca9 100644
--- a/src/Titano.App/Library/LibraryActions.cs
+++ b/src/Titano.App/Library/LibraryActions.cs
@@ -139,7 +139,8 @@ public sealed class LibraryActions(ShellViewModel shell)
NotConnected();
return null;
}
- if (remote.Service.OpenRemote(remote.Server, sequence.Id) is not null)
+ // The proxy cache is read off the UI thread: its manifest holds every frame.
+ if (await Task.Run(() => remote.Service.OpenRemote(remote.Server, sequence.Id)) is not null)
{
shell.OpenSequence(sequence.Id);
return null;
@@ -223,7 +224,7 @@ public sealed class LibraryActions(ShellViewModel shell)
/// The project of a remote card: from its proxy cache when it was opened here, else from the server's manifest; and its frame size when cached.
private static async Task<(ProjectSettings Project, int Width, int Height)> RemoteProjectAsync(RemoteSource remote, Guid id)
{
- if (remote.Service.OpenRemote(remote.Server, id) is { } cached)
+ if (await Task.Run(() => remote.Service.OpenRemote(remote.Server, id)) is { } cached)
{
var frame = cached.Frames.FirstOrDefault(f => f.Width > 0);
var size = frame is null ? (0, 0) : frame.Orientation is >= 5 and <= 8 ? (frame.Height, frame.Width) : (frame.Width, frame.Height);
diff --git a/src/Titano.App/Library/ViewNameDialogViewModel.cs b/src/Titano.App/Library/ViewNameDialogViewModel.cs
index 973b6dc9..982c7ffc 100644
--- a/src/Titano.App/Library/ViewNameDialogViewModel.cs
+++ b/src/Titano.App/Library/ViewNameDialogViewModel.cs
@@ -1,7 +1,9 @@
using System.Windows.Input;
using Titano.App.Archiving;
using Titano.App.Settings;
+using Titano.Core.Diagnostics;
using Titano.Core.Localization;
+using Titano.Data;
using Titano.Ui.Mvvm;
namespace Titano.App.Library;
@@ -38,12 +40,18 @@ public sealed class ViewNameDialogViewModel : ArchiveDialogViewModel
private async Task SaveAsync()
{
+ ClearError();
IsBusy = true;
try
{
await _save(Name.Text.Trim());
Close();
}
+ catch (DatabaseException ex)
+ {
+ Log.Warning("library", "Saving a view failed", ex);
+ ShowError(ex);
+ }
finally
{
IsBusy = false;
diff --git a/src/Titano.App/Sections/LibraryView.xaml b/src/Titano.App/Sections/LibraryView.xaml
index f8107f39..de9c9183 100644
--- a/src/Titano.App/Sections/LibraryView.xaml
+++ b/src/Titano.App/Sections/LibraryView.xaml
@@ -91,10 +91,10 @@
-
+
-
+
@@ -103,7 +103,7 @@
ToolTip="{Binding SaveToolTip}" IsDefault="True" MinWidth="96" Margin="8,0,0,0" />
-
+
@@ -370,7 +370,9 @@
-
+
+
@@ -411,7 +413,7 @@