Skip to content

Commit

Permalink
support following sort order from saved search file: .search-ms #404
Browse files Browse the repository at this point in the history
  • Loading branch information
d2phap committed Mar 9, 2025
1 parent 5313622 commit f198a94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/ImageGlass/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,12 @@ public void LoadImageList(
// check if we should load images from foreground window
var inputImageDirPath = Path.GetDirectoryName(InputImagePathFromArgs) ?? "";
var isFromSearchWindow = Program.ForegroundShellPath.StartsWith(EggShell.SEARCH_MS_PROTOCOL, StringComparison.OrdinalIgnoreCase);
var isFromSavedSearch = Program.ForegroundShellPath.EndsWith(".search-ms", StringComparison.OrdinalIgnoreCase);
var isFromSameDir = inputImageDirPath.Equals(Program.ForegroundShellPath, StringComparison.OrdinalIgnoreCase);

var useForegroundWindow = Program.ForegroundShell != null
&& !string.IsNullOrEmpty(InputImagePathFromArgs)
&& (isFromSearchWindow || isFromSameDir);

&& (isFromSearchWindow || isFromSavedSearch || isFromSameDir);

// start finding image files
_fileFinder.StartFindingFiles(
Expand Down

0 comments on commit f198a94

Please sign in to comment.