瀏覽代碼

Fixed bottom gallery not showing up.

Ruben 7 月之前
父節點
當前提交
2a3053cd6d
共有 1 個文件被更改,包括 6 次插入12 次删除
  1. 6 12
      src/PicView.Avalonia/Navigation/NavigationManager.cs

+ 6 - 12
src/PicView.Avalonia/Navigation/NavigationManager.cs

@@ -364,18 +364,6 @@ public static class NavigationManager
             switch (check.Value.Type)
             {
                 case ErrorHelper.LoadAbleFileType.File:
-                    // Navigate to the image if it exists in the image iterator
-                    if (_imageIterator is not null)
-                    {
-                        if (_imageIterator.ImagePaths.Contains(check.Value.Data))
-                        {
-                            await _imageIterator.IterateToIndex(_imageIterator.ImagePaths.IndexOf(check.Value.Data),
-                                    _cancellationTokenSource)
-                                .ConfigureAwait(false);
-                            return;
-                        }
-                    }
-
                     vm.CurrentView = vm.ImageViewer;
                     await LoadPicFromFile(check.Value.Data, vm).ConfigureAwait(false);
                     vm.IsLoading = false;
@@ -449,6 +437,12 @@ public static class NavigationManager
                 {
                     await _imageIterator.IterateToIndex(index, _cancellationTokenSource).ConfigureAwait(false);
                     await CheckIfTiffAndUpdate(vm, fileInfo, index);
+                    if (Settings.Gallery.IsBottomGalleryShown && GetCount > 0)
+                    {
+                        vm.GalleryMode = GalleryMode.ClosedToBottom;
+                    }
+
+                    vm.AreNavigationButtonsEnabled = true;
                 }
                 else
                 {