From 62f0edf8cbb705590014fd571b9aa7cfabc062ff Mon Sep 17 00:00:00 2001 From: audric Date: Tue, 18 Jan 2022 15:32:10 +1100 Subject: [PATCH] cleanup console.warn calls --- app/sql.js | 2 -- debug_log_preload.js | 2 ++ ts/components/settings/section/CategoryAppearance.tsx | 4 ++-- ts/data/data.ts | 1 - ts/state/selectors/search.ts | 1 - 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/sql.js b/app/sql.js index 5f041b029..6cd7915c7 100644 --- a/app/sql.js +++ b/app/sql.js @@ -2271,8 +2271,6 @@ function hasConversationOutgoingMessage(conversationId) { throw new Error('hasConversationOutgoingMessage: Unable to get coun'); } - console.warn('hasConversationOutgoingMessage', row); - return Boolean(row['count(*)']); } diff --git a/debug_log_preload.js b/debug_log_preload.js index d19b4e646..609beaaa4 100644 --- a/debug_log_preload.js +++ b/debug_log_preload.js @@ -11,6 +11,8 @@ const localeMessages = ipcRenderer.sendSync('locale-data'); global.dcodeIO = global.dcodeIO || {}; global.dcodeIO.ByteBuffer = require('bytebuffer'); +window._ = require('lodash'); + window.getVersion = () => config.version; window.theme = config.theme; window.i18n = i18n.setup(locale, localeMessages); diff --git a/ts/components/settings/section/CategoryAppearance.tsx b/ts/components/settings/section/CategoryAppearance.tsx index 2f0afba7d..200b6d5ab 100644 --- a/ts/components/settings/section/CategoryAppearance.tsx +++ b/ts/components/settings/section/CategoryAppearance.tsx @@ -164,13 +164,13 @@ export const SettingsCategoryAppearance = (props: { hasPassword: boolean | null buttonColor={SessionButtonColor.Primary} buttonText={window.i18n('showDebugLog')} /> - { await fillWithTestData(100, 1000); }} buttonColor={SessionButtonColor.Primary} buttonText={'Spam fill DB using cached'} - /> + /> */} ); } diff --git a/ts/data/data.ts b/ts/data/data.ts index f9096d99a..5e40939d6 100644 --- a/ts/data/data.ts +++ b/ts/data/data.ts @@ -588,7 +588,6 @@ export async function searchConversations(query: string): Promise> { export async function searchMessages(query: string, { limit }: any = {}): Promise> { const messages = await channels.searchMessages(query, { limit }); - console.warn('searched message', messages); return messages; } diff --git a/ts/state/selectors/search.ts b/ts/state/selectors/search.ts index f76a8e029..c6abd9b76 100644 --- a/ts/state/selectors/search.ts +++ b/ts/state/selectors/search.ts @@ -30,7 +30,6 @@ export const getSearchResults = createSelector( selectedConversation?: string, selectedMessage?: string ) => { - console.warn({ state: searchState }); return { contacts: compact( searchState.contacts.map(id => {