Implemented a new dialog for account re-ordering and required apis.
This commit is contained in:
11
Wino.Core/Messages/Accounts/AccountMenuItemsReordered.cs
Normal file
11
Wino.Core/Messages/Accounts/AccountMenuItemsReordered.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wino.Core.Messages.Accounts
|
||||
{
|
||||
/// <summary>
|
||||
/// Emitted when account menu items are reordered.
|
||||
/// </summary>
|
||||
/// <param name="newOrderDictionary">New order info.</param>
|
||||
public record AccountMenuItemsReordered(Dictionary<Guid, int> newOrderDictionary);
|
||||
}
|
||||
@@ -423,7 +423,7 @@ namespace Wino.Core.Services
|
||||
|
||||
if (account == null)
|
||||
{
|
||||
_logger.Error("Could not find account with id {AccountId}", pair.Key);
|
||||
_logger.Information("Could not find account with id {Key} for reordering. It may be a linked account.", pair.Key);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -431,6 +431,8 @@ namespace Wino.Core.Services
|
||||
|
||||
await Connection.UpdateAsync(account);
|
||||
}
|
||||
|
||||
Messenger.Send(new AccountMenuItemsReordered(accountIdOrderPair));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user