Skip to content

Commit

Permalink
queryLimit -> query_limit. changed query_limit from 5 to 20 for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian committed Apr 19, 2024
1 parent bbc2db7 commit c874e52
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend/lib/backfillPreviews.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<GlobalState>({
conversations: {},
Expand Down Expand Up @@ -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 }
2 changes: 1 addition & 1 deletion loadpreviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ';
Expand Down

0 comments on commit c874e52

Please sign in to comment.