From 37413f180a25c2513216e42dbceeefca00422e1a Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Fri, 24 Sep 2021 22:50:10 +0200 Subject: [PATCH] FIX: Do not display userColorSchemeId in the UI (#14441) A followup to #14066. The previous fix worked correctly only if the user had the default theme active. --- .../discourse/app/controllers/preferences/interface.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/interface.js b/app/assets/javascripts/discourse/app/controllers/preferences/interface.js index e16e5b61e84..8a769cee584 100644 --- a/app/assets/javascripts/discourse/app/controllers/preferences/interface.js +++ b/app/assets/javascripts/discourse/app/controllers/preferences/interface.js @@ -243,12 +243,12 @@ export default Controller.extend({ return; } - const defaultTheme = this.site.user_themes?.findBy("default", true); + const theme = this.userSelectableThemes?.findBy("id", this.themeId); // we don't want to display the numeric ID of a scheme // when it is set by the theme but not marked as user selectable if ( - defaultTheme?.color_scheme_id === this.session.userColorSchemeId && + theme?.color_scheme_id === this.session.userColorSchemeId && !this.userSelectableColorSchemes.findBy( "id", this.session.userColorSchemeId