minor clean up and update

This commit is contained in:
Jeremy 2024-05-30 21:49:44 +10:00
parent f902eaed0d
commit 9e39e48bf8
4 changed files with 22 additions and 8 deletions

View file

@ -186,8 +186,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
/// </summary>
public bool ShouldUsePinyin { get; set; } = false;
public bool UseExternalPreview { get; set; } = false;
public bool AlwaysPreview { get; set; } = false;
public bool AlwaysStartEn { get; set; } = false;

View file

@ -2,14 +2,30 @@
namespace Flow.Launcher.Plugin
{
public interface IAsyncExternalPreview: IFeatures
/// <summary>
/// This interface is for plugins that wish to provide file preview (external preview)
/// via a third party app instead of the default preview.
/// </summary>
public interface IAsyncExternalPreview : IFeatures
{
public Task TogglePreviewAsync(string path);
/// <summary>
/// Method for opening/showing the preview.
/// </summary>
/// <param name="path">The file path to open the preview for</param>
/// <param name="sendFailToast">Whether to send a toast message notification on failure for the user</param>
public Task OpenPreviewAsync(string path, bool sendFailToast = true);
/// <summary>
/// Method for closing/hiding the preview.
/// </summary>
public Task ClosePreviewAsync();
/// <summary>
/// Method for switching the preview to the next file result.
/// This requires the external preview be already open/showing
/// </summary>
/// <param name="path">The file path to switch the preview for</param>
/// <param name="sendFailToast">Whether to send a toast message notification on failure for the user</param>
public Task SwitchPreviewAsync(string path, bool sendFailToast = true);
}
}

View file

@ -261,7 +261,7 @@ namespace Flow.Launcher.Plugin
/// Contains data used to populate the preview section of this result.
/// </summary>
public PreviewInfo Preview { get; set; } = PreviewInfo.Default;
/// <summary>
/// Info of the preview section of a <see cref="Result"/>
/// </summary>
@ -291,7 +291,7 @@ namespace Flow.Launcher.Plugin
public IconDelegate PreviewDelegate { get; set; } = null;
/// <summary>
/// File path of the result. For third-party preview programs such as QuickLook.
/// File path of the result. For third-party programs providing external preview.
/// </summary>
public string FilePath { get; set; } = null;

View file

@ -768,7 +768,7 @@ namespace Flow.Launcher.ViewModel
public int ResultAreaColumn { get; set; } = ResultAreaColumnPreviewShown;
// This is not a reliable indicator of whether external preview is visible due to the
// ability of manually closing/exiting the external preview program, and this does not inform flow that
// ability of manually closing/exiting the external preview program which, does not inform flow that
// preview is no longer available.
public bool ExternalPreviewVisible { get; set; } = false;