Move logout and report bug to Setting screen
This commit is contained in:
parent
3f7a83c519
commit
166f9e47f2
36 changed files with 429 additions and 175 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue