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.
This commit is contained in:
Jarek Radosz
2021-09-24 22:50:10 +02:00
committed by GitHub
parent 01e50f325d
commit 37413f180a

View File

@@ -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