Simplify the logic for content with and without comments
This commit is contained in:
@@ -30,7 +30,6 @@ import { ref, onBeforeMount } from 'vue';
|
||||
import { useClient } from '@/plugins/api.js';
|
||||
import Message from "@/views/messages/Message.vue";
|
||||
|
||||
const emit = defineEmits(['messages-found']);
|
||||
const props = defineProps({
|
||||
subjectId: {
|
||||
type: String,
|
||||
@@ -71,10 +70,6 @@ async function load({ done, page_size = 10 }) {
|
||||
messages.value.push(...response.data.messages);
|
||||
const [last_content] = response.data.messages.slice(-1);
|
||||
last_id = last_content.id;
|
||||
|
||||
if (messageCount > 0) {
|
||||
emit('messages-found', true);
|
||||
}
|
||||
}
|
||||
|
||||
if (messageCount < page_size) {
|
||||
|
||||
Reference in New Issue
Block a user