[DO NOT USE] Cleanup AccountPreference

This commit is contained in:
tarsin committed 2023-06-06 01:18:04 +08:00
1 parent 2f309fe9bb
commit a450dd29f9
1 file changed
+3 -2
@@ -60,10 +60,11 @@ fun EhScreen() {
snackbarHost = { SnackbarHost(snackbarHostState) }, snackbarHost = { SnackbarHost(snackbarHostState) },
) { paddingValues -> ) { paddingValues ->
val signOutMessage = stringResource(id = R.string.settings_eh_sign_out_tip) val signOutMessage = stringResource(id = R.string.settings_eh_sign_out_tip)
val touristMode = stringResource(id = R.string.settings_eh_identity_cookies_tourist)
Column(modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState())) { Column(modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState())) {
Preference( Preference(
title = stringResource(id = R.string.account_name), title = stringResource(id = R.string.account_name),
summary = Settings.displayName ?: stringResource(id = R.string.settings_eh_identity_cookies_tourist), summary = Settings.displayName ?: touristMode,
) { ) {
val eCookies = EhCookieStore.getCookies(EhUrl.HOST_E.toHttpUrl()) val eCookies = EhCookieStore.getCookies(EhUrl.HOST_E.toHttpUrl())
val exCookies = EhCookieStore.getCookies(EhUrl.HOST_EX.toHttpUrl()) val exCookies = EhCookieStore.getCookies(EhUrl.HOST_EX.toHttpUrl())
@@ -84,7 +85,7 @@ fun EhScreen() {
setMessage(spanned) setMessage(spanned)
setNeutralButton(R.string.settings_eh_identity_cookies_copy) { _, _ -> context whisperClipboard str.replace("<br>", "\n") } setNeutralButton(R.string.settings_eh_identity_cookies_copy) { _, _ -> context whisperClipboard str.replace("<br>", "\n") }
} else { } else {
setMessage(context.getString(R.string.settings_eh_identity_cookies_tourist)) setMessage(touristMode)
} }
setPositiveButton(R.string.settings_eh_sign_out) { _, _ -> setPositiveButton(R.string.settings_eh_sign_out) { _, _ ->
EhUtils.signOut() EhUtils.signOut()