optimize<*>: App.RaiseException should be called in UIThread; add default progress description for popups;

This commit is contained in:
leo 2024-02-26 11:29:57 +08:00
parent dc0b33ba21
commit 9c3294c285
35 changed files with 100 additions and 34 deletions

View file

@ -1,4 +1,5 @@
using System;
using Avalonia.Threading;
using System;
using System.Diagnostics;
using System.IO;
@ -51,7 +52,9 @@ namespace SourceGit.Commands {
return rs;
} catch (Exception e) {
App.RaiseException(repo, "Save file failed: " + e.Message);
Dispatcher.UIThread.Invoke(() => {
App.RaiseException(repo, "Save file failed: " + e.Message);
});
return false;
}
}