mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add ShowBadge property
This commit is contained in:
parent
5d39501707
commit
d8f4eac0d2
2 changed files with 11 additions and 1 deletions
|
|
@ -251,6 +251,12 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
public string RecordKey { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the badge icon should be shown.
|
||||
/// If users want to show the result badges and here you set this to true, the results will show the badge icon.
|
||||
/// </summary>
|
||||
public bool ShowBadge { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Run this result, asynchronously
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -128,9 +128,13 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
get
|
||||
{
|
||||
if (!Settings.ShowBadges || !BadgeIconAvailable)
|
||||
// If results do not allow badges, or user has disabled badges in settings,
|
||||
// or badge icon is not available, then do not show badge
|
||||
if (!Result.ShowBadge || !Settings.ShowBadges || !BadgeIconAvailable)
|
||||
return Visibility.Collapsed;
|
||||
|
||||
// If user has set to show badges only for global results, and this is not a global result,
|
||||
// then do not show badge
|
||||
if (Settings.ShowBadgesGlobalOnly && !IsGlobalQuery)
|
||||
return Visibility.Collapsed;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue