code cleanup

This commit is contained in:
2024-06-11 06:59:17 +02:00
parent 07cacbfbda
commit ac3cfc270c
21 changed files with 317 additions and 414 deletions

View File

@@ -2,17 +2,16 @@
using OwnChar.App.Desktop.UI.MainTabs;
using Pilz.Plugins.Advanced;
namespace OwnChar.App.Desktop.Features.MainWindow.QuickAction
{
internal class HomeFeature() : PluginFunction(FeatureCodes.QuickAction, "ownchar.home", "Home"), IPluginFeatureProvider<HomeFeature>
{
public static HomeFeature Instance { get; } = new();
namespace OwnChar.App.Desktop.Features.MainWindow.QuickAction;
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is MainWindowParams p)
p.Api.OpenTab(new TabUserView(p.Api, p.Api.Manager?.CurrentUser), p.Api.Manager!.CurrentUser!.Username!);
return null;
}
internal class HomeFeature() : PluginFunction(FeatureCodes.QuickAction, "ownchar.home", "Home"), IPluginFeatureProvider<HomeFeature>
{
public static HomeFeature Instance { get; } = new();
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is MainWindowParams p)
p.Api.OpenTab(new TabUserView(p.Api, p.Api.Manager?.CurrentUser), p.Api.Manager!.CurrentUser!.Username!);
return null;
}
}