|
|
@ -21,17 +21,17 @@ class ActivityModule(@get:Provides val activity: Activity) {
|
|
|
|
get() = activity
|
|
|
|
get() = activity
|
|
|
|
|
|
|
|
|
|
|
|
@Provides
|
|
|
|
@Provides
|
|
|
|
@ActivityScope
|
|
|
|
@ActivityScoped
|
|
|
|
fun getThemeBase(preferences: Preferences, inventory: Inventory): ThemeBase
|
|
|
|
fun getThemeBase(preferences: Preferences, inventory: Inventory): ThemeBase
|
|
|
|
= ThemeBase.getThemeBase(preferences, inventory, activity.intent)
|
|
|
|
= ThemeBase.getThemeBase(preferences, inventory, activity.intent)
|
|
|
|
|
|
|
|
|
|
|
|
@Provides
|
|
|
|
@Provides
|
|
|
|
@ActivityScope
|
|
|
|
@ActivityScoped
|
|
|
|
fun getThemeColor(colorProvider: ColorProvider, preferences: Preferences): ThemeColor
|
|
|
|
fun getThemeColor(colorProvider: ColorProvider, preferences: Preferences): ThemeColor
|
|
|
|
= colorProvider.getThemeColor(preferences.defaultThemeColor, true)
|
|
|
|
= colorProvider.getThemeColor(preferences.defaultThemeColor, true)
|
|
|
|
|
|
|
|
|
|
|
|
@Provides
|
|
|
|
@Provides
|
|
|
|
@ActivityScope
|
|
|
|
@ActivityScoped
|
|
|
|
fun getThemeAccent(colorProvider: ColorProvider, preferences: Preferences): ThemeAccent
|
|
|
|
fun getThemeAccent(colorProvider: ColorProvider, preferences: Preferences): ThemeAccent
|
|
|
|
= colorProvider.getThemeAccent(preferences.getInt(R.string.p_theme_accent, 1))
|
|
|
|
= colorProvider.getThemeAccent(preferences.getInt(R.string.p_theme_accent, 1))
|
|
|
|
}
|
|
|
|
}
|