Merge Account and Cookies

This commit is contained in:
tarsin committed 2022-09-16 10:35:40 +08:00
1 parent b8e649e995
commit 0bc2e45137
2 files changed
+3 -9

No files matched your search

@@ -32,7 +32,7 @@ import okhttp3.Cookie
import okhttp3.HttpUrl.Companion.toHttpUrl
import java.util.*
class IdentityCookiePreference @JvmOverloads constructor(
class AccountPreference @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : MessagePreference(context, attrs) {
private val mActivity = context as SettingsActivity
@@ -94,7 +94,7 @@ class IdentityCookiePreference @JvmOverloads constructor(
// There is no need to notify user by toast since Tiramisu have its clipboard own logic
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU)
mActivity.showTip(R.string.copied_to_clipboard, BaseScene.LENGTH_SHORT)
this@IdentityCookiePreference.onClick(dialog, which)
this@AccountPreference.onClick(dialog, which)
}
builder.setNegativeButton(android.R.string.cancel, null)
} else {
+1 -7
View File
@@ -17,7 +17,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Preference
<com.hippo.ehviewer.preference.AccountPreference
android:key="account"
android:summary="@string/settings_eh_identity_cookies_tourist"
android:title="@string/account_name"
@@ -29,12 +29,6 @@
android:title="@string/settings_eh_sign_out"
app:iconSpaceReserved="false" />
<com.hippo.ehviewer.preference.IdentityCookiePreference
android:key="identity_cookie"
android:summary="@string/settings_eh_identity_cookies_summary"
android:title="@string/settings_eh_identity_cookies"
app:iconSpaceReserved="false" />
<rikka.preference.SimpleMenuPreference
android:defaultValue="1"
android:key="gallery_site"