fix(*): show special characters, like '-', '_', etc, in local branches; App.RaiseError crashes when called in other threads except UI.

This commit is contained in:
leo 2020-08-07 23:40:23 +08:00
parent cf203c66aa
commit 8bc23a7d71
3 changed files with 29 additions and 27 deletions

View file

@ -33,8 +33,9 @@ namespace SourceGit {
/// </summary>
/// <param name="message"></param>
public static void RaiseError(string msg) {
var main = Current.MainWindow as UI.Launcher;
main.Dispatcher.Invoke(() => main.Errors.Add(msg));
Current.Dispatcher.Invoke(() => {
(Current.MainWindow as UI.Launcher).Errors.Add(msg);
});
}
/// <summary>