From 51947576aae53765f7a2d5cea9e984acf177984e Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Sun, 14 Mar 2021 09:16:58 -0500 Subject: [PATCH] HistoryEditorDialog: Use system theme --- .../activities/common/dialogs/HistoryEditorDialog.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uhabits-android/src/main/java/org/isoron/uhabits/activities/common/dialogs/HistoryEditorDialog.kt b/uhabits-android/src/main/java/org/isoron/uhabits/activities/common/dialogs/HistoryEditorDialog.kt index f35dc2168..fcad26125 100644 --- a/uhabits-android/src/main/java/org/isoron/uhabits/activities/common/dialogs/HistoryEditorDialog.kt +++ b/uhabits-android/src/main/java/org/isoron/uhabits/activities/common/dialogs/HistoryEditorDialog.kt @@ -25,6 +25,7 @@ import org.isoron.platform.gui.AndroidDataView import org.isoron.platform.time.JavaLocalDateFormatter import org.isoron.uhabits.HabitsApplication import org.isoron.uhabits.R +import org.isoron.uhabits.activities.AndroidThemeSwitcher import org.isoron.uhabits.core.commands.Command import org.isoron.uhabits.core.commands.CommandRunner import org.isoron.uhabits.core.models.Habit @@ -53,12 +54,15 @@ class HistoryEditorDialog : AppCompatDialogFragment(), CommandRunner.Listener { habit = component.habitList.getById(arguments!!.getLong("habit"))!! preferences = component.preferences + val themeSwitcher = AndroidThemeSwitcher(activity!!, preferences) + themeSwitcher.apply() + chart = HistoryChart( dateFormatter = JavaLocalDateFormatter(Locale.getDefault()), firstWeekday = preferences.firstWeekday, paletteColor = habit.color, series = emptyList(), - theme = LightTheme(), + theme = themeSwitcher.currentTheme, today = DateUtils.getTodayWithOffset().toLocalDate(), onDateClickedListener = onDateClickedListener ?: OnDateClickedListener { }, padding = 10.0,