Implemented a new dialog for account re-ordering and required apis.

This commit is contained in:
Burak Kaan Köse
2024-06-09 02:37:30 +02:00
parent f4e81aca9d
commit c7781d2e75
14 changed files with 241 additions and 8 deletions

View 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);
}

View File

@@ -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));
}
}
}