Use dark theme in HabitPickerDialog.kt

Fixes #916
pull/1033/head
Alinson S. Xavier 4 years ago
parent 2fe3b15806
commit 1cf71b3973
No known key found for this signature in database
GPG Key ID: DCA0DAD4D2F58624

@ -3,7 +3,7 @@
## [2.0.3] - [Unreleased] ## [2.0.3] - [Unreleased]
### Fixed ### Fixed
- Improve automatic checkmarks for monthly habits (@iSoron, 947) - Improve automatic checkmarks for monthly habits (@iSoron, 947)
- Fix small issues with the pure black theme (@iSoron) - Fix small theme issues (@iSoron)
## [2.0.2] - 2021-05-23 ## [2.0.2] - 2021-05-23

@ -31,6 +31,7 @@ import android.widget.ListView
import android.widget.TextView import android.widget.TextView
import org.isoron.uhabits.HabitsApplication import org.isoron.uhabits.HabitsApplication
import org.isoron.uhabits.R import org.isoron.uhabits.R
import org.isoron.uhabits.activities.AndroidThemeSwitcher
import org.isoron.uhabits.core.preferences.WidgetPreferences import org.isoron.uhabits.core.preferences.WidgetPreferences
import org.isoron.uhabits.widgets.WidgetUpdater import org.isoron.uhabits.widgets.WidgetUpdater
import java.util.ArrayList import java.util.ArrayList
@ -58,11 +59,13 @@ open class HabitPickerDialog : Activity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
val component = (applicationContext as HabitsApplication).component val component = (applicationContext as HabitsApplication).component
AndroidThemeSwitcher(this, component.preferences).apply()
val habitList = component.habitList val habitList = component.habitList
widgetPreferences = component.widgetPreferences widgetPreferences = component.widgetPreferences
widgetUpdater = component.widgetUpdater widgetUpdater = component.widgetUpdater
widgetId = intent.extras?.getInt(EXTRA_APPWIDGET_ID, INVALID_APPWIDGET_ID) ?: 0 widgetId = intent.extras?.getInt(EXTRA_APPWIDGET_ID, INVALID_APPWIDGET_ID) ?: 0
val habitIds = ArrayList<Long>() val habitIds = ArrayList<Long>()
val habitNames = ArrayList<String>() val habitNames = ArrayList<String>()
for (h in habitList) { for (h in habitList) {

Loading…
Cancel
Save