mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Provide dark theme parameter.
This commit is contained in:
+2
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user