Ensure new wallets show up in the menu

This commit is contained in:
TheXamlGuy
2024-06-10 22:47:04 +01:00
parent 60d6fe8785
commit 0026c3186b
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -2,9 +2,9 @@
public record Insert public record Insert
{ {
public static InsertEventArgs<TValue> As<TValue>(int index, TValue value) => public static InsertEventArgs<TSender> As<TSender>(int index, TSender sender) =>
new(index, value); new(index, sender);
public static InsertEventArgs<TValue> As<TValue>(int index) where TValue : new() => public static InsertEventArgs<TSender> As<TSender>(int index) where TSender : new() =>
new(index, new TValue()); new(index, new TSender());
} }
+1 -1
View File
@@ -1,3 +1,3 @@
namespace Toolkit.Foundation; namespace Toolkit.Foundation;
public record InsertEventArgs<TValue>(int Index, TValue Value); public record InsertEventArgs<TSender>(int Index, TSender Sender);
+1 -1
View File
@@ -315,7 +315,7 @@ public partial class ObservableCollection<TItem> :
{ {
if (Activated) if (Activated)
{ {
if (args.Value is TItem item) if (args.Sender is TItem item)
{ {
Insert(args.Index, item); Insert(args.Index, item);
} }