♻️ Move the realm service from sphere to the pass

This commit is contained in:
2025-10-21 23:45:36 +08:00
parent 46ebd92dc1
commit d6c37784e1
33 changed files with 6220 additions and 510 deletions

View File

@@ -11,7 +11,7 @@ public class PublisherService(
AppDatabase db,
FileReferenceService.FileReferenceServiceClient fileRefs,
ICacheService cache,
AccountClientHelper accountsHelper
RemoteAccountService remoteAccountsHelper
)
{
public async Task<SnPublisher?> GetPublisherByName(string name)
@@ -420,7 +420,7 @@ public class PublisherService(
public async Task<SnPublisherMember> LoadMemberAccount(SnPublisherMember member)
{
var account = await accountsHelper.GetAccount(member.AccountId);
var account = await remoteAccountsHelper.GetAccount(member.AccountId);
member.Account = SnAccount.FromProtoValue(account);
return member;
}
@@ -428,7 +428,7 @@ public class PublisherService(
public async Task<List<SnPublisherMember>> LoadMemberAccounts(ICollection<SnPublisherMember> members)
{
var accountIds = members.Select(m => m.AccountId).ToList();
var accounts = (await accountsHelper.GetAccountBatch(accountIds)).ToDictionary(a => Guid.Parse(a.Id), a => a);
var accounts = (await remoteAccountsHelper.GetAccountBatch(accountIds)).ToDictionary(a => Guid.Parse(a.Id), a => a);
return [.. members.Select(m =>
{