Refactor away some unnecessary lambda expressions

This commit is contained in:
arkon
2023-03-26 13:27:31 -04:00
parent 1a61130f0b
commit be54b8862e
16 changed files with 37 additions and 47 deletions
@@ -97,7 +97,7 @@ class SecureActivityDelegateImpl : SecureActivityDelegate, DefaultLifecycleObser
secureScreen == SecurityPreferences.SecureScreenMode.ALWAYS ||
secureScreen == SecurityPreferences.SecureScreenMode.INCOGNITO && incognitoMode
}
.onEach { activity.window.setSecureScreen(it) }
.onEach(activity.window::setSecureScreen)
.launchIn(activity.lifecycleScope)
}
@@ -62,6 +62,6 @@ class ThemingDelegateImpl : ThemingDelegate {
override fun applyAppTheme(activity: Activity) {
val uiPreferences = Injekt.get<UiPreferences>()
ThemingDelegate.getThemeResIds(uiPreferences.appTheme().get(), uiPreferences.themeDarkAmoled().get())
.forEach { activity.setTheme(it) }
.forEach(activity::setTheme)
}
}