🐛 Fix message history display latency

This commit is contained in:
LittleSheep 2024-06-24 22:25:17 +08:00
parent 7034ff80db
commit 7c35323279

View File

@ -18,9 +18,13 @@ class ChatHistoryController {
}
Future<void> getMessages(Channel channel, String scope) async {
syncHistory(channel);
isLoading.value = true;
totalHistoryCount.value =
await database.syncMessages(channel, scope: scope);
totalHistoryCount.value = await database.syncMessages(
channel,
scope: scope,
);
await syncHistory(channel);
isLoading.value = false;
}