From d041d6a821a1e4fa28ae614299cf556b7c70ad76 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 27 Feb 2017 22:15:05 +0000 Subject: [PATCH] Allow linking to filters within the site --- .../discourse/initializers/extend-for-solved-button.js.es6 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 index 375471b..abfb1e3 100644 --- a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 +++ b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 @@ -113,6 +113,8 @@ function initializeWithApi(api) { api.includePostAttributes('can_accept_answer', 'can_unaccept_answer', 'accepted_answer'); + api.addDiscoveryQueryParam('solved', {replace: true, refreshModel: true}); + api.addPostMenuButton('solved', attrs => { const canAccept = attrs.can_accept_answer; const canUnaccept = attrs.can_unaccept_answer;