From c00ffabac31ea80b248a6ceb800e564bed2eb7aa Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 22 Feb 2017 17:45:12 -0500 Subject: [PATCH] search scope checkbox is default checked for your messages too --- app/assets/javascripts/discourse/widgets/header.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/header.js.es6 b/app/assets/javascripts/discourse/widgets/header.js.es6 index 252baf173e2..7a7dd85299f 100644 --- a/app/assets/javascripts/discourse/widgets/header.js.es6 +++ b/app/assets/javascripts/discourse/widgets/header.js.es6 @@ -163,6 +163,8 @@ createWidget('header-buttons', { } }); +const forceContextEnabled = ['category', 'user', 'private_messages']; + export default createWidget('header', { tagName: 'header.d-header.clearfix', buildKey: () => `header`, @@ -200,7 +202,7 @@ export default createWidget('header', { state.searchContextType = contextType; if (state.contextEnabled === undefined) { - if (contextType === 'category' || contextType === 'user') { + if (forceContextEnabled.includes(contextType)) { state.contextEnabled = true; } }