File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ public class SeerProProvider : IPreviewPopupProvider
18
18
{
19
19
public static SeerProProvider Instance { get ; } = new ( ) ;
20
20
21
+ private string ? CurrentPath ;
22
+
21
23
public async Task TogglePreviewPopup ( string path )
22
24
{
23
25
HWND Window = User32 . FindWindow ( "SeerWindowClass" , null ) ;
@@ -26,11 +28,14 @@ public async Task TogglePreviewPopup(string path)
26
28
data . cbData = ( path . Length + 1 ) * 2 ;
27
29
data . lpData = Marshal . StringToHGlobalUni ( path ) ;
28
30
User32 . SendMessage ( Window , ( uint ) User32 . WindowMessage . WM_COPYDATA , 0 , ref data ) ;
31
+
32
+ CurrentPath = User32 . IsWindowVisible ( Window ) ? path : null ;
29
33
}
30
34
31
35
public async Task SwitchPreview ( string path )
32
36
{
33
- // TODO
37
+ if ( CurrentPath is not null && path != CurrentPath )
38
+ await TogglePreviewPopup ( path ) ;
34
39
}
35
40
36
41
public async Task < bool > DetectAvailability ( )
You can’t perform that action at this time.
0 commit comments