diff --git a/frontend/lib/backfillPreviews.ts b/frontend/lib/backfillPreviews.ts index 72a3132..438d330 100644 --- a/frontend/lib/backfillPreviews.ts +++ b/frontend/lib/backfillPreviews.ts @@ -1,4 +1,4 @@ -import { MessageData, emitter, state , addPreview, queryLimit} from './global'; +import { MessageData, emitter, state , addPreview, query_limit} from './global'; import moment from 'moment'; import ThreadPreviewInterface from '../components/ThreadPreview/ThreadPreview.vue'; @@ -118,7 +118,7 @@ export async function loadPreviews(extensionUUID:string, older_than:string) { fetching = false; console.log('load preview error:', e); }finally{ - if(temp.length< queryLimit){ + if(temp.length< query_limit){ emitter.emit("no-more-previews"); } //console.log(temp); diff --git a/frontend/lib/global.ts b/frontend/lib/global.ts index 26de7cd..56bda9f 100644 --- a/frontend/lib/global.ts +++ b/frontend/lib/global.ts @@ -32,7 +32,7 @@ type GlobalState = { page: number, oldestMessage: Number, }; -const queryLimit = 5; //this limits the nubmer of threadpreview results per load request +const query_limit = 20; //this limits the nubmer of threadpreview results per load request const state = reactive({ conversations: {}, @@ -141,4 +141,4 @@ function updateOldestMessage(newOldestTimestamp: Number){ //console.log(state.oldestMessage) return state.oldestMessage; } -export { state, emitter, queryLimit, MessageData, GlobalState, ThreadChangePayload, addMessage, addPreview, updatePageNumber } +export { state, emitter, query_limit, MessageData, GlobalState, ThreadChangePayload, addMessage, addPreview, updatePageNumber } diff --git a/loadpreviews.php b/loadpreviews.php index 0112be2..00bb0d2 100644 --- a/loadpreviews.php +++ b/loadpreviews.php @@ -34,7 +34,7 @@ include_once "footer.php"; die(); } -$query_limit = 5; +$query_limit = 20; //this is for Limiting the list of threads on initial load $sql = 'SELECT * FROM webtexting_threads WHERE domain_uuid = :domain_uuid AND local_number = :local_number ';