🐛 Fix realm lost info when transfering between services

This commit is contained in:
2025-11-02 01:52:42 +08:00
parent 8f5f1efa24
commit 70fdc247e7
2 changed files with 22 additions and 8 deletions

View File

@@ -367,7 +367,7 @@ public class TimelineService(
.Select(p => p.RealmId!.Value)
.Distinct()
.ToList();
if (!postRealmIds.Any())
if (postRealmIds.Count == 0)
return;
var realms = await rs.GetRealmBatch(postRealmIds.Select(id => id.ToString()).ToList());
@@ -376,9 +376,7 @@ public class TimelineService(
foreach (var post in posts.Where(p => p.RealmId != null))
{
if (realmDict.TryGetValue(post.RealmId!.Value, out var realm))
{
post.Realm = realm;
}
}
}