don't display similar notes under search

This commit is contained in:
zadam 2020-12-25 13:06:58 +01:00
parent 75c3bd8ae3
commit 95760f1d28
2 changed files with 5 additions and 3 deletions

View File

@ -41,7 +41,9 @@ const TPL = `
export default class SimilarNotesWidget extends TabAwareWidget {
isEnabled() {
return super.isEnabled() && !this.note.hasLabel('similarNotesWidgetDisabled');
return super.isEnabled()
&& this.note.type !== 'search'
&& !this.note.hasLabel('similarNotesWidgetDisabled');
}
doRender() {

View File

@ -566,7 +566,7 @@ class ConsistencyChecks {
}
runDbDiagnostics() {
function getTableCount(tableName) {
function getTableRowCount(tableName) {
const count = sql.getValue(`SELECT COUNT(1) FROM ${tableName}`);
return `${tableName}: ${count}`;
@ -574,7 +574,7 @@ class ConsistencyChecks {
const tables = [ "notes", "note_revisions", "branches", "attributes", "api_tokens" ];
log.info("Table counts: " + tables.map(tableName => getTableCount(tableName)).join(", "));
log.info("Table counts: " + tables.map(tableName => getTableRowCount(tableName)).join(", "));
}
async runChecks() {