pref: 适配 Android 13 预测性返回手势
This commit is contained in:
parent
819a88ba62
commit
612e73afd4
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
<application
|
||||
android:name=".BaseApplication"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_descriptor"
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class AppThemeActivity : BaseActivity() {
|
|||
ChatBubbleStyleAdapter.Bubble { context, _, parent ->
|
||||
val view = LayoutInflater.from(context)
|
||||
.inflate(R.layout.layout_bubble_toolbar_primary_color, parent, false)
|
||||
view.findViewById<TintSwitch>(R.id.theme_toolbar_primary_color).apply {
|
||||
view.findViewById<TintSwitch>(R.id.theme_toolbar_primary_color)?.apply {
|
||||
setOnCheckedChangeListener(null)
|
||||
isChecked = appPreferences.toolbarPrimaryColor
|
||||
setOnCheckedChangeListener { _, isChecked ->
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ open class MainActivity : BaseActivity(), NavigationBarView.OnItemSelectedListen
|
|||
.show()
|
||||
dataStore.putBoolean(SP_SHOULD_SHOW_SNACKBAR, false)
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && AccountUtil.isLoggedIn(this)) {
|
||||
requestPermission {
|
||||
permissions = listOf(PermissionUtils.POST_NOTIFICATIONS)
|
||||
description = getString(R.string.desc_permission_post_notifications)
|
||||
|
|
|
|||
Loading…
Reference in New Issue