Skip to content

Commit

Permalink
add limits
Browse files Browse the repository at this point in the history
  • Loading branch information
jonluca committed Apr 18, 2023
1 parent bcbe28d commit 38ec090
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions electron-src/data/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ export class SQLDatabase {
.select(["message_id"])
.where("text", "match", cleanedQuery)
.orderBy(sql`rank`, "asc")
.limit(1000)
.execute();
const messageGuids = textMatch.map((m) => m.message_id as string);
return this.fullTextMessageSearchWithGuids(messageGuids, searchTerm, chatIds, handleIds, startDate, endDate);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const MimessageApp = ({ Component, pageProps }: AppProps) => {
if (isInitialized === false) {
return <Initializing />;
}
if (localDbExists === true) {
if (localDbExists === true && isInitialized) {
return <Component {...pageProps} />;
}
return <CircularProgress />;
Expand Down

0 comments on commit 38ec090

Please sign in to comment.