mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
update external preview methods to use the external preview interface
This commit is contained in:
parent
666211dd4c
commit
8da1313e5f
1 changed files with 9 additions and 26 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
@ -614,38 +614,21 @@ namespace Flow.Launcher.ViewModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ToggleExternalPreviewAsync(string path)
|
private void OpenExternalPreview(string path, bool sendFailToast = true)
|
||||||
{
|
{
|
||||||
bool success = await QuickLookHelper.ToggleQuickLookAsync(path).ConfigureAwait(false);
|
_ = PluginManager.OpenExternalPreviewAsync(path, sendFailToast).ConfigureAwait(false);
|
||||||
if (success)
|
ExternalPreviewVisible = true;
|
||||||
{
|
|
||||||
ExternalPreviewOpen = !ExternalPreviewOpen;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OpenExternalPreviewAsync(string path, bool sendFailToast = true)
|
private void CloseExternalPreview()
|
||||||
{
|
{
|
||||||
bool success = await QuickLookHelper.OpenQuickLookAsync(path, sendFailToast).ConfigureAwait(false);
|
_ = PluginManager.CloseExternalPreviewAsync().ConfigureAwait(false);
|
||||||
if (success)
|
ExternalPreviewVisible = false;
|
||||||
{
|
|
||||||
ExternalPreviewOpen = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task CloseExternalPreviewAsync()
|
private void SwitchExternalPreview(string path, bool sendFailToast = true)
|
||||||
{
|
{
|
||||||
bool success = await QuickLookHelper.CloseQuickLookAsync().ConfigureAwait(false);
|
_ = PluginManager.SwitchExternalPreviewAsync(path,sendFailToast).ConfigureAwait(false);
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
ExternalPreviewOpen = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task SwitchExternalPreviewAsync(string path, bool sendFailToast = true)
|
|
||||||
{
|
|
||||||
// Switches preview content
|
|
||||||
// When external is off, do nothing
|
|
||||||
_ = QuickLookHelper.SwitchQuickLookAsync(path, sendFailToast).ConfigureAwait(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowInternalPreview()
|
private void ShowInternalPreview()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue