Add disabled launcher items
This commit is contained in:
@@ -151,7 +151,7 @@ public sealed class LauncherController : IDisposable
|
||||
|
||||
private void RecordRecentItem(LauncherItem item)
|
||||
{
|
||||
if (item.Type == LauncherItemType.Menu || string.IsNullOrWhiteSpace(item.Target))
|
||||
if (item.Type == LauncherItemType.Menu || item.IsDisabled || string.IsNullOrWhiteSpace(item.Target))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -182,6 +182,7 @@ public sealed class LauncherController : IDisposable
|
||||
Arguments = item.Arguments,
|
||||
IconPath = item.IconPath,
|
||||
IsFavorite = false,
|
||||
IsDisabled = false,
|
||||
DisplayMode = item.DisplayMode,
|
||||
Children = []
|
||||
};
|
||||
@@ -194,7 +195,7 @@ public sealed class LauncherController : IDisposable
|
||||
|
||||
foreach (LauncherItem child in menuItem.Children)
|
||||
{
|
||||
if (child.Type == LauncherItemType.Menu || string.IsNullOrWhiteSpace(child.Target))
|
||||
if (child.Type == LauncherItemType.Menu || child.IsDisabled || string.IsNullOrWhiteSpace(child.Target))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -224,7 +225,7 @@ public sealed class LauncherController : IDisposable
|
||||
{
|
||||
error = null;
|
||||
|
||||
if (item.Type == LauncherItemType.Menu || string.IsNullOrWhiteSpace(item.Target))
|
||||
if (item.Type == LauncherItemType.Menu || item.IsDisabled || string.IsNullOrWhiteSpace(item.Target))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user