diff --git a/packages/frontend/src/components/MkNotifications.vue b/packages/frontend/src/components/MkNotifications.vue index 8d99e440e1..77e66f0165 100644 --- a/packages/frontend/src/components/MkNotifications.vue +++ b/packages/frontend/src/components/MkNotifications.vue @@ -4,25 +4,27 @@ SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue index a2ada35f91..845c7a414c 100644 --- a/packages/frontend/src/components/MkTimeline.vue +++ b/packages/frontend/src/components/MkTimeline.vue @@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only --> @@ -196,25 +196,18 @@ const pagination = { params: query, }; -const reloadTimeline = (fromPR = false) => { - tlNotesCount = 0; +function reloadTimeline() { + return new Promise((res) => { + tlNotesCount = 0; - tlComponent.pagingComponent?.reload().then(() => { - reloadStream(); - if (fromPR) prComponent.refreshFinished(); + tlComponent.pagingComponent?.reload().then(() => { + reloadStream(); + res(); + }); }); -}; - -//const pullRefresh = () => reloadTimeline(true); +} defineExpose({ reloadTimeline, }); - -/* TODO -const timetravel = (date?: Date) => { - this.date = date; - this.$refs.tl.reload(); -}; -*/