Provide dark theme parameter.
This commit is contained in:
parent
cfbd0c4c02
commit
460e095e78
5 changed files with 12 additions and 5 deletions
|
|
@ -22,10 +22,11 @@ import timber.log.Timber
|
|||
|
||||
fun onSuccessLogout(
|
||||
activity: Activity,
|
||||
darkTheme: Boolean,
|
||||
url: String?,
|
||||
) {
|
||||
Timber.d("Success logout with result url: $url")
|
||||
url?.let {
|
||||
activity.openUrlInChromeCustomTab(null, false, it)
|
||||
activity.openUrlInChromeCustomTab(null, darkTheme, it)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import com.bumble.appyx.core.plugin.plugins
|
|||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import io.element.android.anvilannotations.ContributesNode
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.features.logout.api.LogoutEntryPoint
|
||||
import io.element.android.features.logout.api.util.onSuccessLogout
|
||||
import io.element.android.libraries.di.SessionScope
|
||||
|
|
@ -45,10 +46,11 @@ class LogoutNode @AssistedInject constructor(
|
|||
override fun View(modifier: Modifier) {
|
||||
val state = presenter.present()
|
||||
val activity = LocalContext.current as Activity
|
||||
val isDark = ElementTheme.isLightTheme.not()
|
||||
LogoutView(
|
||||
state = state,
|
||||
onChangeRecoveryKeyClick = ::onChangeRecoveryKeyClick,
|
||||
onSuccessLogout = { onSuccessLogout(activity, it) },
|
||||
onSuccessLogout = { onSuccessLogout(activity, isDark, it) },
|
||||
onBackClick = ::navigateUp,
|
||||
modifier = modifier,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue