Skip to content

Commit 9e39e48

Browse files
committed
minor clean up and update
1 parent f902eae commit 9e39e48

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ public CustomBrowserViewModel CustomBrowser
186186
/// </summary>
187187
public bool ShouldUsePinyin { get; set; } = false;
188188

189-
public bool UseExternalPreview { get; set; } = false;
190-
191189
public bool AlwaysPreview { get; set; } = false;
192190

193191
public bool AlwaysStartEn { get; set; } = false;

Flow.Launcher.Plugin/Interfaces/IAsyncExternalPreview.cs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,30 @@
22

33
namespace Flow.Launcher.Plugin
44
{
5-
public interface IAsyncExternalPreview: IFeatures
5+
/// <summary>
6+
/// This interface is for plugins that wish to provide file preview (external preview)
7+
/// via a third party app instead of the default preview.
8+
/// </summary>
9+
public interface IAsyncExternalPreview : IFeatures
610
{
7-
public Task TogglePreviewAsync(string path);
8-
11+
/// <summary>
12+
/// Method for opening/showing the preview.
13+
/// </summary>
14+
/// <param name="path">The file path to open the preview for</param>
15+
/// <param name="sendFailToast">Whether to send a toast message notification on failure for the user</param>
916
public Task OpenPreviewAsync(string path, bool sendFailToast = true);
1017

18+
/// <summary>
19+
/// Method for closing/hiding the preview.
20+
/// </summary>
1121
public Task ClosePreviewAsync();
1222

23+
/// <summary>
24+
/// Method for switching the preview to the next file result.
25+
/// This requires the external preview be already open/showing
26+
/// </summary>
27+
/// <param name="path">The file path to switch the preview for</param>
28+
/// <param name="sendFailToast">Whether to send a toast message notification on failure for the user</param>
1329
public Task SwitchPreviewAsync(string path, bool sendFailToast = true);
1430
}
1531
}

Flow.Launcher.Plugin/Result.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public ValueTask<bool> ExecuteAsync(ActionContext context)
261261
/// Contains data used to populate the preview section of this result.
262262
/// </summary>
263263
public PreviewInfo Preview { get; set; } = PreviewInfo.Default;
264-
264+
265265
/// <summary>
266266
/// Info of the preview section of a <see cref="Result"/>
267267
/// </summary>
@@ -291,7 +291,7 @@ public record PreviewInfo
291291
public IconDelegate PreviewDelegate { get; set; } = null;
292292

293293
/// <summary>
294-
/// File path of the result. For third-party preview programs such as QuickLook.
294+
/// File path of the result. For third-party programs providing external preview.
295295
/// </summary>
296296
public string FilePath { get; set; } = null;
297297

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ public bool InternalPreviewVisible
768768
public int ResultAreaColumn { get; set; } = ResultAreaColumnPreviewShown;
769769

770770
// This is not a reliable indicator of whether external preview is visible due to the
771-
// ability of manually closing/exiting the external preview program, and this does not inform flow that
771+
// ability of manually closing/exiting the external preview program which, does not inform flow that
772772
// preview is no longer available.
773773
public bool ExternalPreviewVisible { get; set; } = false;
774774

0 commit comments

Comments
 (0)