|
|
@@ -1,4 +1,6 @@
|
|
|
-using PicView.Avalonia.Gallery;
|
|
|
+using Avalonia.Media;
|
|
|
+using Avalonia.Threading;
|
|
|
+using PicView.Avalonia.Gallery;
|
|
|
using PicView.Avalonia.Interfaces;
|
|
|
using PicView.Avalonia.UI;
|
|
|
using PicView.Avalonia.ViewModels;
|
|
|
@@ -80,6 +82,14 @@ public static class FileListManager
|
|
|
}
|
|
|
else return;
|
|
|
|
|
|
+ await Dispatcher.UIThread.InvokeAsync(() =>
|
|
|
+ {
|
|
|
+ // Fixes the text alignment
|
|
|
+ // TODO: Find a better solution
|
|
|
+ UIHelper.GetEditableTitlebar.TextBlock.TextAlignment = TextAlignment.Left;
|
|
|
+ UIHelper.GetEditableTitlebar.TextBlock.TextAlignment = TextAlignment.Center;
|
|
|
+ });
|
|
|
+
|
|
|
await GalleryLoad.ReloadGalleryAsync(vm, vm.FileInfo.DirectoryName);
|
|
|
}
|
|
|
|
|
|
@@ -97,6 +107,15 @@ public static class FileListManager
|
|
|
SetTitleHelper.SetTitle(vm);
|
|
|
}
|
|
|
else return;
|
|
|
+
|
|
|
+ await Dispatcher.UIThread.InvokeAsync(() =>
|
|
|
+ {
|
|
|
+ // Fixes the text alignment
|
|
|
+ // TODO: Find a better solution
|
|
|
+ UIHelper.GetEditableTitlebar.TextBlock.TextAlignment = TextAlignment.Left;
|
|
|
+ UIHelper.GetEditableTitlebar.TextBlock.TextAlignment = TextAlignment.Center;
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
await GalleryLoad.ReloadGalleryAsync(vm, vm.FileInfo.DirectoryName);
|
|
|
}
|