Skip to content

Commit 769ab9c

Browse files
committed
Merge branch 'main' of https://github.com/heftymouse/Files
2 parents a23ba41 + a342c29 commit 769ab9c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Files.App/ServicesImplementation/PreviewPopupProviders/SeerProProvider.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public class SeerProProvider : IPreviewPopupProvider
1818
{
1919
public static SeerProProvider Instance { get; } = new();
2020

21+
private string? CurrentPath;
22+
2123
public async Task TogglePreviewPopup(string path)
2224
{
2325
HWND Window = User32.FindWindow("SeerWindowClass", null);
@@ -26,11 +28,14 @@ public async Task TogglePreviewPopup(string path)
2628
data.cbData = (path.Length + 1) * 2;
2729
data.lpData = Marshal.StringToHGlobalUni(path);
2830
User32.SendMessage(Window, (uint)User32.WindowMessage.WM_COPYDATA, 0, ref data);
31+
32+
CurrentPath = User32.IsWindowVisible(Window) ? path : null;
2933
}
3034

3135
public async Task SwitchPreview(string path)
3236
{
33-
// TODO
37+
if (CurrentPath is not null && path != CurrentPath)
38+
await TogglePreviewPopup(path);
3439
}
3540

3641
public async Task<bool> DetectAvailability()

tests/Files.InteractionTests/Files.InteractionTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<ItemGroup>
1313
<PackageReference Include="Appium.WebDriver" Version="4.4.5" />
1414
<PackageReference Include="Axe.Windows" Version="2.1.2" />
15-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.1" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
1616
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
1717
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
1818
</ItemGroup>

0 commit comments

Comments
 (0)