mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Move logout and report bug to Setting screen
This commit is contained in:
committed by
Benoit Marty
parent
3f7a83c519
commit
166f9e47f2
@@ -18,6 +18,7 @@ dependencies {
|
||||
implementation(project(":libraries:di"))
|
||||
implementation(project(":libraries:core"))
|
||||
implementation(project(":features:rageshake"))
|
||||
implementation(project(":features:logout"))
|
||||
implementation(project(":libraries:designsystem"))
|
||||
implementation(project(":libraries:elementresources"))
|
||||
implementation(libs.mavericks.compose)
|
||||
|
||||
+13
-7
@@ -1,37 +1,43 @@
|
||||
@file:OptIn(ExperimentalMaterial3Api::class)
|
||||
|
||||
package io.element.android.x.features.preferences
|
||||
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import io.element.android.x.designsystem.components.preferences.PreferenceScreen
|
||||
import io.element.android.x.features.rageshake.preferences.RageshakePreferenceCategory
|
||||
import io.element.android.x.element.resources.R as ElementR
|
||||
import io.element.android.x.features.logout.LogoutPreference
|
||||
import io.element.android.x.features.rageshake.preferences.RageshakePreferences
|
||||
|
||||
@Composable
|
||||
fun PreferencesScreen(
|
||||
onBackPressed: () -> Unit = {},
|
||||
onOpenRageShake: () -> Unit = {},
|
||||
onSuccessLogout: () -> Unit = {},
|
||||
) {
|
||||
// TODO Hierarchy!
|
||||
// TODO Move logout here
|
||||
// Include pref from other modules
|
||||
PreferencesContent(onBackPressed = onBackPressed)
|
||||
PreferencesContent(
|
||||
onBackPressed = onBackPressed,
|
||||
onOpenRageShake = onOpenRageShake,
|
||||
onSuccessLogout = onSuccessLogout,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun PreferencesContent(
|
||||
modifier: Modifier = Modifier,
|
||||
onBackPressed: () -> Unit = {},
|
||||
onOpenRageShake: () -> Unit = {},
|
||||
onSuccessLogout: () -> Unit = {},
|
||||
) {
|
||||
PreferenceScreen(
|
||||
modifier = modifier,
|
||||
onBackPressed = onBackPressed,
|
||||
title = stringResource(id = ElementR.string.settings)
|
||||
) {
|
||||
RageshakePreferenceCategory()
|
||||
LogoutPreference(onSuccessLogout = onSuccessLogout)
|
||||
RageshakePreferences(onOpenRageShake = onOpenRageShake)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user