work
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using ModpackUpdater.Apps.Manager.Api;
|
||||
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||
using ModpackUpdater.Apps.Manager.LangRes;
|
||||
using ModpackUpdater.Apps.Manager.Ui;
|
||||
using Pilz.Features;
|
||||
using Pilz.UI.Symbols;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Features.CM;
|
||||
|
||||
@@ -12,16 +12,13 @@ internal class ClearDirectLinkFeature : PluginFunction, IPluginFeatureProvider<C
|
||||
|
||||
public ClearDirectLinkFeature() : base(FeatureTypes.ActionsContextMenu, "origin.cleardirectlink", FeatureNamesLangRes.ClearDirectLinkFeature)
|
||||
{
|
||||
Icon = AppGlobals.Symbols.GetImage(AppSymbols.broom, Pilz.UI.Symbols.SymbolSize.Small);
|
||||
Icon = AppGlobals.Symbols.GetImage(AppSymbols.broom, SymbolSize.Small);
|
||||
}
|
||||
|
||||
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
|
||||
protected override Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||
{
|
||||
if (@params is not MainApiParameters p || p.Api.Model.SelectedGridRow is not { } row)
|
||||
return null;
|
||||
|
||||
SharedFunctions.ClearDirectLinks(row);
|
||||
|
||||
return null;
|
||||
if (@params is MainApiParameters p && p.Api.Model.SelectedGridRow is { } row)
|
||||
SharedFunctions.ClearDirectLinks(row);
|
||||
return Task.FromResult<object?>(null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user