@@ -49,6 +49,8 @@ public partial class MainViewModel : BaseModel, ISavable
49
49
private ChannelWriter < ResultsForUpdate > _resultsUpdateChannelWriter ;
50
50
private Task _resultsViewUpdateTask ;
51
51
52
+ private readonly IReadOnlyList < Result > _emptyResult = new List < Result > ( ) ;
53
+
52
54
#endregion
53
55
54
56
#region Constructor
@@ -830,16 +832,18 @@ private static string VerifyOrSetDefaultHotkey(string hotkey, string defaultHotk
830
832
831
833
#region Preview
832
834
833
- private bool ? _selectedItemFromQueryResults ;
835
+ private static readonly int ResultAreaColumnPreviewShown = 1 ;
836
+ private static readonly int ResultAreaColumnPreviewHidden = 3 ;
834
837
835
- private ResultViewModel _selectedItem ;
838
+ private bool ? _selectedItemFromQueryResults ;
836
839
840
+ private ResultViewModel _previewSelectedItem ;
837
841
public ResultViewModel PreviewSelectedItem
838
842
{
839
- get => _selectedItem ;
843
+ get => _previewSelectedItem ;
840
844
set
841
845
{
842
- _selectedItem = value ;
846
+ _previewSelectedItem = value ;
843
847
OnPropertyChanged ( ) ;
844
848
}
845
849
}
@@ -862,10 +866,6 @@ public bool InternalPreviewVisible
862
866
}
863
867
}
864
868
865
- private static readonly int ResultAreaColumnPreviewShown = 1 ;
866
-
867
- private static readonly int ResultAreaColumnPreviewHidden = 3 ;
868
-
869
869
public int ResultAreaColumn { get ; set ; } = ResultAreaColumnPreviewShown ;
870
870
871
871
// This is not a reliable indicator of whether external preview is visible due to the
@@ -1016,7 +1016,7 @@ private bool QueryResultsPreviewed()
1016
1016
1017
1017
#region Query
1018
1018
1019
- public void Query ( bool isReQuery = false )
1019
+ private void Query ( bool isReQuery = false )
1020
1020
{
1021
1021
if ( QueryResultsSelected ( ) )
1022
1022
{
@@ -1121,8 +1121,6 @@ private void QueryHistory()
1121
1121
}
1122
1122
}
1123
1123
1124
- private readonly IReadOnlyList < Result > _emptyResult = new List < Result > ( ) ;
1125
-
1126
1124
private async Task QueryResultsAsync ( bool isReQuery = false , bool reSelect = true )
1127
1125
{
1128
1126
_updateSource ? . Cancel ( ) ;
@@ -1420,6 +1418,18 @@ public void ToggleFlowLauncher()
1420
1418
}
1421
1419
}
1422
1420
1421
+ /// <summary>
1422
+ /// Checks if Flow Launcher should ignore any hotkeys
1423
+ /// </summary>
1424
+ public bool ShouldIgnoreHotkeys ( )
1425
+ {
1426
+ return Settings . IgnoreHotkeysOnFullscreen && Win32Helper . IsForegroundWindowFullscreen ( ) || GameModeStatus ;
1427
+ }
1428
+
1429
+ #endregion
1430
+
1431
+ #region Public Methods
1432
+
1423
1433
public void Show ( )
1424
1434
{
1425
1435
Application . Current . Dispatcher . Invoke ( ( ) =>
@@ -1505,7 +1515,7 @@ public async void Hide()
1505
1515
// 📌 Apply DWM Cloak (Completely hide the window)
1506
1516
Win32Helper . DWMSetCloakForWindow ( mainWindow , true ) ;
1507
1517
}
1508
-
1518
+
1509
1519
await Task . Delay ( 50 ) ;
1510
1520
1511
1521
// Update WPF properties
@@ -1518,17 +1528,8 @@ public async void Hide()
1518
1528
#pragma warning restore VSTHRD100 // Avoid async void methods
1519
1529
1520
1530
/// <summary>
1521
- /// Checks if Flow Launcher should ignore any hotkeys
1531
+ /// Save history, user selected records and top most records
1522
1532
/// </summary>
1523
- public bool ShouldIgnoreHotkeys ( )
1524
- {
1525
- return Settings . IgnoreHotkeysOnFullscreen && Win32Helper . IsForegroundWindowFullscreen ( ) || GameModeStatus ;
1526
- }
1527
-
1528
- #endregion
1529
-
1530
- #region Public Methods
1531
-
1532
1533
public void Save ( )
1533
1534
{
1534
1535
_historyItemsStorage . Save ( ) ;
0 commit comments