From bcdd1f9875cb80373fff2cfe73a77fe52172c0a8 Mon Sep 17 00:00:00 2001 From: keplyx Date: Sun, 8 Mar 2020 13:29:43 +0100 Subject: [PATCH] Moved custom theme in AprilFoolsManager.js --- utils/AprilFoolsManager.js | 21 +++++++++++++++++++++ utils/ThemeManager.js | 23 +---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/utils/AprilFoolsManager.js b/utils/AprilFoolsManager.js index 058738f..c664210 100644 --- a/utils/AprilFoolsManager.js +++ b/utils/AprilFoolsManager.js @@ -49,6 +49,27 @@ export default class AprilFoolsManager { return menu; } + static getAprilFoolsTheme(currentTheme : Object) { + return { + ...currentTheme, + colors: { + ...currentTheme.colors, + primary: '#bebe03', + accent: '#bebe03', + background: '#5b3e02', + tabBackground: "#5b3e02", + card: "#5b3e02", + surface: "#5b3e02", + dividerBackground: '#362201', + textDisabled: '#b9b9b9', + + // Calendar/Agenda + agendaBackgroundColor: '#5b3e02', + agendaDayTextColor: '#6d6d6d', + }, + }; + } + isAprilFoolsEnabled() { return this.aprilFoolsEnabled; } diff --git a/utils/ThemeManager.js b/utils/ThemeManager.js index cdd972f..90ce5eb 100644 --- a/utils/ThemeManager.js +++ b/utils/ThemeManager.js @@ -93,27 +93,6 @@ export default class ThemeManager { }; } - static getAprilFoolsTheme() { - return { - ...ThemeManager.getBaseTheme(), - colors: { - ...ThemeManager.getBaseTheme().colors, - primary: '#bebe03', - accent: '#bebe03', - background: '#5b3e02', - tabBackground: "#5b3e02", - card: "#5b3e02", - surface: "#5b3e02", - dividerBackground: '#362201', - textDisabled: '#b9b9b9', - - // Calendar/Agenda - agendaBackgroundColor: '#5b3e02', - agendaDayTextColor: '#6d6d6d', - }, - }; - } - /** * Get this class instance or create one if none is found * @returns {ThemeManager} @@ -137,7 +116,7 @@ export default class ThemeManager { */ static getCurrentTheme(): Object { if (AprilFoolsManager.getInstance().isAprilFoolsEnabled()) - return ThemeManager.getAprilFoolsTheme(); + return AprilFoolsManager.getAprilFoolsTheme(ThemeManager.getBaseTheme()); else return ThemeManager.getBaseTheme() }