File tree Expand file tree Collapse file tree 1 file changed +23
-13
lines changed Expand file tree Collapse file tree 1 file changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -572,25 +572,35 @@ public string PreviewHotkey
572
572
public string Image => Constant . QueryTextBoxIconImagePath ;
573
573
574
574
public bool StartWithEnglishMode => Settings . AlwaysStartEn ;
575
-
576
- public bool PreviewVisible { get ; set ; } = false ;
577
-
578
- public int ResultAreaColumn { get ; set ; } = 1 ;
579
-
575
+
580
576
#endregion
581
577
582
578
#region Preview
583
579
584
- // Not accurate
585
- public bool ExternalPreviewOpen { get ; set ; } = false ;
586
-
587
- [ RelayCommand ]
588
- private void TogglePreview ( )
580
+ public bool InternalPreviewVisible
589
581
{
590
- if ( PreviewVisible )
582
+ get
591
583
{
592
- // To deal with always preview
593
- HideInternalPreview ( ) ;
584
+ if ( ResultAreaColumn == ResultAreaColumnPreviewShown )
585
+ return true ;
586
+
587
+ if ( ResultAreaColumn == ResultAreaColumnPreviewHidden )
588
+ return false ;
589
+ #if DEBUG
590
+ throw new NotImplementedException ( "ResultAreaColumn should match ResultAreaColumnPreviewShown/ResultAreaColumnPreviewHidden value" ) ;
591
+ #else
592
+ Log . Error ( "MainViewModel" , "ResultAreaColumnPreviewHidden/ResultAreaColumnPreviewShown int value not implemented" , "InternalPreviewVisible" ) ;
593
+ #endif
594
+ return false ;
595
+ }
596
+ }
597
+
598
+ private static readonly int ResultAreaColumnPreviewShown = 1 ;
599
+
600
+ private static readonly int ResultAreaColumnPreviewHidden = 3 ;
601
+
602
+ public int ResultAreaColumn { get ; set ; } = ResultAreaColumnPreviewShown ;
603
+
594
604
}
595
605
else if ( Settings . UseExternalPreview && CanExternalPreviewSelectedResult ( out var path ) )
596
606
{
You can’t perform that action at this time.
0 commit comments