diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 2b01d56d4..f73b5be60 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -454,11 +454,16 @@ const round = ref(0); const page = ref(0); function onLoad(index: any, done: any) { - page.value++; - setTimeout(() => { - done(); - getDataNotification(page.value, "NOMAL"); - }, 1500); + if ( + notiList.value.length < totalInbox.value || + (notiList.value.length === 0 && totalInbox.value === 0) + ) { + page.value++; + setTimeout(() => { + done(); + getDataNotification(page.value, "NOMAL"); + }, 1500); + } } watch( @@ -545,10 +550,16 @@ watch( -
+
@@ -581,7 +592,13 @@ watch( -