feat: re-apply timelines loading optimization (#524)

Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
patak 2022-12-26 06:39:18 +01:00 committed by GitHub
parent db7f82422e
commit baa2696d31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 155 additions and 99 deletions

View file

@ -1,20 +1,10 @@
<script setup lang="ts">
const { t } = useI18n()
const masto = useMasto()
// Default limit is 20 notifications, and servers are normally caped to 30
const paginator = masto.notifications.iterate({ limit: 30 })
const { clearNotifications } = useNotifications()
onActivated(clearNotifications)
const stream = await masto.stream.streamUser()
useHeadFixed({
title: () => `${t('tab.notifications_all')} | ${t('nav_side.notifications')}`,
})
</script>
<template>
<NotificationPaginator v-bind="{ paginator, stream }" />
<TimelineNotifications v-if="isMastoInitialised" />
</template>