Skip to content

Commit a380839

Browse files
hamza221backportbot[bot]
authored andcommitted
fix: disable loading when there are no more activities to load
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com> [skip ci]
1 parent 9cafbf9 commit a380839

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/views/ActivityAppFeed.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ async function loadActivities() {
156156
)
157157
allActivities.value.push(...response.data.ocs.data.map((raw) => new ActivityModel(raw)))
158158
lastActivityLoaded.value = response.headers['x-activity-last-given']
159-
hasMoreActivites.value = true
159+
// If less than the hardcoded limit, there are no more activities
160+
if (response.data.ocs.data.length < 50) {
161+
hasMoreActivites.value = false
162+
}
160163
} catch (error) {
161164
// Skip if no activites are available
162165
if (axios.isAxiosError(error) && error.response?.status === 304) {

0 commit comments

Comments
 (0)