Improve filtering
This commit is contained in:
@@ -10,8 +10,6 @@ public class InvokeNavigationViewItemAction :
|
||||
AvaloniaObject,
|
||||
IAction
|
||||
{
|
||||
private int currentIndex;
|
||||
|
||||
public static readonly StyledProperty<int> SelectedIndexProperty =
|
||||
AvaloniaProperty.Register<InvokeNavigationViewItemAction, int>(nameof(SelectedIndex), 0);
|
||||
|
||||
@@ -32,11 +30,6 @@ public class InvokeNavigationViewItemAction :
|
||||
|
||||
public object? Execute(object? sender, object? parameter)
|
||||
{
|
||||
//if (SelectedIndex == currentIndex)
|
||||
//{
|
||||
// return false;
|
||||
//}
|
||||
|
||||
if ((Target ?? sender) is NavigationViewItem navigationViewItem)
|
||||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
@@ -60,7 +53,6 @@ public class InvokeNavigationViewItemAction :
|
||||
if (collection is { Count: > 0 })
|
||||
{
|
||||
navigationView.SetValue(NavigationView.SelectedItemProperty, collection[SelectedIndex]);
|
||||
currentIndex = SelectedIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user