Skip to content

Commit d8f4eac

Browse files
committed
Add ShowBadge property
1 parent 5d39501 commit d8f4eac

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Flow.Launcher.Plugin/Result.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ public string PluginDirectory
251251
/// </summary>
252252
public string RecordKey { get; set; } = null;
253253

254+
/// <summary>
255+
/// Determines if the badge icon should be shown.
256+
/// If users want to show the result badges and here you set this to true, the results will show the badge icon.
257+
/// </summary>
258+
public bool ShowBadge { get; set; } = false;
259+
254260
/// <summary>
255261
/// Run this result, asynchronously
256262
/// </summary>

Flow.Launcher/ViewModel/ResultViewModel.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,13 @@ public Visibility ShowBadge
128128
{
129129
get
130130
{
131-
if (!Settings.ShowBadges || !BadgeIconAvailable)
131+
// If results do not allow badges, or user has disabled badges in settings,
132+
// or badge icon is not available, then do not show badge
133+
if (!Result.ShowBadge || !Settings.ShowBadges || !BadgeIconAvailable)
132134
return Visibility.Collapsed;
133135

136+
// If user has set to show badges only for global results, and this is not a global result,
137+
// then do not show badge
134138
if (Settings.ShowBadgesGlobalOnly && !IsGlobalQuery)
135139
return Visibility.Collapsed;
136140

0 commit comments

Comments
 (0)