Skip to content

Commit 38ec090

Browse files
committed
add limits
1 parent bcbe28d commit 38ec090

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

electron-src/data/database.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ export class SQLDatabase {
259259
.select(["message_id"])
260260
.where("text", "match", cleanedQuery)
261261
.orderBy(sql`rank`, "asc")
262+
.limit(1000)
262263
.execute();
263264
const messageGuids = textMatch.map((m) => m.message_id as string);
264265
return this.fullTextMessageSearchWithGuids(messageGuids, searchTerm, chatIds, handleIds, startDate, endDate);

src/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const MimessageApp = ({ Component, pageProps }: AppProps) => {
117117
if (isInitialized === false) {
118118
return <Initializing />;
119119
}
120-
if (localDbExists === true) {
120+
if (localDbExists === true && isInitialized) {
121121
return <Component {...pageProps} />;
122122
}
123123
return <CircularProgress />;

0 commit comments

Comments
 (0)