mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
style: 🎨 Run Biome
This commit is contained in:
parent
83ff97d7ff
commit
7461478170
|
|
@ -141,7 +141,7 @@ const deleteNote = async () => {
|
||||||
|
|
||||||
if (result?.data) {
|
if (result?.data) {
|
||||||
console.log("Status deleted", result.data);
|
console.log("Status deleted", result.data);
|
||||||
emits('delete')
|
emits("delete");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { Status } from '~/types/mastodon/status';
|
import type { Status } from "~/types/mastodon/status";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
timeline: Status[];
|
timeline: Status[];
|
||||||
|
|
@ -52,13 +52,19 @@ useIntervalFn(() => {
|
||||||
props.loadPrev();
|
props.loadPrev();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
watch(() => props.timeline, (newTimeline, oldTimeline) => {
|
watch(
|
||||||
|
() => props.timeline,
|
||||||
|
(newTimeline, oldTimeline) => {
|
||||||
// If posts are deleted, don't start loading more posts
|
// If posts are deleted, don't start loading more posts
|
||||||
if (newTimeline.length === oldTimeline.length - 1) return;
|
if (newTimeline.length === oldTimeline.length - 1) return;
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
// If less than NOTES_PER_PAGE statuses are returned, we have reached the end
|
// If less than NOTES_PER_PAGE statuses are returned, we have reached the end
|
||||||
if (newTimeline.length - oldTimeline.length < useConfig().NOTES_PER_PAGE) {
|
if (
|
||||||
|
newTimeline.length - oldTimeline.length <
|
||||||
|
useConfig().NOTES_PER_PAGE
|
||||||
|
) {
|
||||||
hasReachedEnd.value = true;
|
hasReachedEnd.value = true;
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in a new issue