fix: always set loading

This commit is contained in:
Jannis Mattheis 2025-08-08 09:52:10 +02:00
parent 43574a075c
commit 271f555102
1 changed files with 11 additions and 8 deletions

View File

@ -55,15 +55,18 @@ export class MessagesStore {
}
this.loading = true;
try {
const pagedResult = await this.fetchMessages(appId, state.nextSince).then(
(resp) => resp.data
);
state.messages.replace([...state.messages, ...pagedResult.messages]);
state.nextSince = pagedResult.paging.since ?? 0;
state.hasMore = 'next' in pagedResult.paging;
state.loaded = true;
} finally {
this.loading = false;
}
return Promise.resolve();
};