Merge pull request #3681 from vector-im/feature/dla/fix_account_notifications_discrepancies

Fixes Changing Account Settings > Notifications > Advanced Notifications on android causes discrepancies with web
This commit is contained in:
Benoit Marty 2021-07-27 15:14:35 +02:00 committed by GitHub
commit 00911a7f7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 233 additions and 157 deletions

1
changelog.d/3681.removal Normal file
View File

@ -0,0 +1 @@
updatePushRuleActions signature has been updated to more explicitly enabled/disable the rule and update the actions. It's behaviour has also been changed to match the web with the enable/disable requests being sent on every invocation and actions sent when needed(not null).

View File

@ -31,7 +31,13 @@ interface PushRuleService {
suspend fun addPushRule(kind: RuleKind, pushRule: PushRule)
suspend fun updatePushRuleActions(kind: RuleKind, oldPushRule: PushRule, newPushRule: PushRule)
/**
* Enables/Disables a push rule and updates the actions if necessary
* @param enable Enables/Disables the rule
* @param actions Actions to update if not null
*/
suspend fun updatePushRuleActions(kind: RuleKind, ruleId: String, enable: Boolean, actions: List<Action>?)
suspend fun removePushRule(kind: RuleKind, pushRule: PushRule)

View File

@ -18,6 +18,7 @@ package org.matrix.android.sdk.api.pushrules.rest
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import org.matrix.android.sdk.api.extensions.orFalse
import org.matrix.android.sdk.api.pushrules.Action
import org.matrix.android.sdk.api.pushrules.getActions
import org.matrix.android.sdk.api.pushrules.toJson
@ -100,6 +101,13 @@ data class PushRule(
)
}
/**
* Get the highlight status. As spec mentions assume false if no tweak present.
*/
fun getHighlight(): Boolean {
return getActions().filterIsInstance<Action.Highlight>().firstOrNull()?.highlight.orFalse()
}
/**
* Set the notification status.
*

View File

@ -113,8 +113,8 @@ internal class DefaultPushRuleService @Inject constructor(
addPushRuleTask.execute(AddPushRuleTask.Params(kind, pushRule))
}
override suspend fun updatePushRuleActions(kind: RuleKind, oldPushRule: PushRule, newPushRule: PushRule) {
updatePushRuleActionsTask.execute(UpdatePushRuleActionsTask.Params(kind, oldPushRule, newPushRule))
override suspend fun updatePushRuleActions(kind: RuleKind, ruleId: String, enable: Boolean, actions: List<Action>?) {
updatePushRuleActionsTask.execute(UpdatePushRuleActionsTask.Params(kind, ruleId, enable, actions))
}
override suspend fun removePushRule(kind: RuleKind, pushRule: PushRule) {

View File

@ -15,8 +15,9 @@
*/
package org.matrix.android.sdk.internal.session.pushers
import org.matrix.android.sdk.api.pushrules.Action
import org.matrix.android.sdk.api.pushrules.RuleKind
import org.matrix.android.sdk.api.pushrules.rest.PushRule
import org.matrix.android.sdk.api.pushrules.toJson
import org.matrix.android.sdk.internal.network.GlobalErrorReceiver
import org.matrix.android.sdk.internal.network.executeRequest
import org.matrix.android.sdk.internal.task.Task
@ -25,8 +26,9 @@ import javax.inject.Inject
internal interface UpdatePushRuleActionsTask : Task<UpdatePushRuleActionsTask.Params, Unit> {
data class Params(
val kind: RuleKind,
val oldPushRule: PushRule,
val newPushRule: PushRule
val ruleId: String,
val enable: Boolean,
val actions: List<Action>?
)
}
@ -36,20 +38,14 @@ internal class DefaultUpdatePushRuleActionsTask @Inject constructor(
) : UpdatePushRuleActionsTask {
override suspend fun execute(params: UpdatePushRuleActionsTask.Params) {
if (params.oldPushRule.enabled != params.newPushRule.enabled) {
// First change enabled state
executeRequest(globalErrorReceiver) {
pushRulesApi.updateEnableRuleStatus(params.kind.value, params.newPushRule.ruleId, params.newPushRule.enabled)
pushRulesApi.updateEnableRuleStatus(params.kind.value, params.ruleId, enable = params.enable)
}
}
if (params.newPushRule.enabled) {
// Also ensure the actions are up to date
val body = mapOf("actions" to params.newPushRule.actions)
executeRequest(globalErrorReceiver) {
pushRulesApi.updateRuleActions(params.kind.value, params.newPushRule.ruleId, body)
if (params.actions != null) {
val body = mapOf("actions" to params.actions.toJson())
executeRequest(globalErrorReceiver) {
pushRulesApi.updateRuleActions(params.kind.value, params.ruleId, body)
}
}
}
}
}

View File

@ -111,12 +111,12 @@ import im.vector.app.features.roomprofile.settings.RoomSettingsFragment
import im.vector.app.features.roomprofile.uploads.RoomUploadsFragment
import im.vector.app.features.roomprofile.uploads.files.RoomUploadsFilesFragment
import im.vector.app.features.roomprofile.uploads.media.RoomUploadsMediaFragment
import im.vector.app.features.settings.VectorSettingsAdvancedNotificationPreferenceFragment
import im.vector.app.features.settings.notifications.VectorSettingsAdvancedNotificationPreferenceFragment
import im.vector.app.features.settings.VectorSettingsGeneralFragment
import im.vector.app.features.settings.VectorSettingsHelpAboutFragment
import im.vector.app.features.settings.VectorSettingsLabsFragment
import im.vector.app.features.settings.VectorSettingsNotificationPreferenceFragment
import im.vector.app.features.settings.VectorSettingsNotificationsTroubleshootFragment
import im.vector.app.features.settings.notifications.VectorSettingsNotificationPreferenceFragment
import im.vector.app.features.settings.notifications.VectorSettingsNotificationsTroubleshootFragment
import im.vector.app.features.settings.VectorSettingsPinFragment
import im.vector.app.features.settings.VectorSettingsPreferencesFragment
import im.vector.app.features.settings.VectorSettingsSecurityPrivacyFragment

View File

@ -22,18 +22,23 @@ import android.view.View
import android.widget.RadioGroup
import androidx.preference.PreferenceViewHolder
import im.vector.app.R
import org.matrix.android.sdk.api.pushrules.Action
import org.matrix.android.sdk.api.pushrules.RuleIds
import org.matrix.android.sdk.api.pushrules.RuleSetKey
import org.matrix.android.sdk.api.pushrules.rest.PushRule
import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind
class PushRulePreference : VectorPreference {
enum class NotificationIndex(val index: Int) {
OFF(0),
SILENT(1),
NOISY(2);
companion object {
fun fromInt(index: Int) = values().first { it.index == index }
}
}
/**
* @return the selected push rule and its kind
* @return the selected push rule index
*/
var ruleAndKind: PushRuleAndKind? = null
var index: NotificationIndex? = null
private set
constructor(context: Context) : super(context)
@ -47,44 +52,12 @@ class PushRulePreference : VectorPreference {
}
/**
* @return the bing rule status index
*/
private val ruleStatusIndex: Int
get() {
val safeRule = ruleAndKind?.pushRule ?: return NOTIFICATION_OFF_INDEX
if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) {
if (safeRule.shouldNotNotify()) {
return if (safeRule.enabled) {
NOTIFICATION_OFF_INDEX
} else {
NOTIFICATION_SILENT_INDEX
}
} else if (safeRule.shouldNotify()) {
return NOTIFICATION_NOISY_INDEX
}
}
if (safeRule.enabled) {
return if (safeRule.shouldNotNotify()) {
NOTIFICATION_OFF_INDEX
} else if (safeRule.getNotificationSound() != null) {
NOTIFICATION_NOISY_INDEX
} else {
NOTIFICATION_SILENT_INDEX
}
}
return NOTIFICATION_OFF_INDEX
}
/**
* Update the push rule.
* Update the notification index.
*
* @param pushRule
*/
fun setPushRule(pushRuleAndKind: PushRuleAndKind?) {
ruleAndKind = pushRuleAndKind
fun setIndex(notificationIndex: NotificationIndex?) {
index = notificationIndex
refreshSummary()
}
@ -92,74 +65,13 @@ class PushRulePreference : VectorPreference {
* Refresh the summary
*/
private fun refreshSummary() {
summary = context.getString(when (ruleStatusIndex) {
NOTIFICATION_OFF_INDEX -> R.string.notification_off
NOTIFICATION_SILENT_INDEX -> R.string.notification_silent
else -> R.string.notification_noisy
summary = context.getString(when (index) {
NotificationIndex.OFF -> R.string.notification_off
NotificationIndex.SILENT -> R.string.notification_silent
NotificationIndex.NOISY, null -> R.string.notification_noisy
})
}
/**
* Create a push rule with the updated required at index.
*
* @param index index
* @return a push rule with the updated flags / null if there is no update
*/
fun createNewRule(index: Int): PushRule? {
val safeRule = ruleAndKind?.pushRule ?: return null
val safeKind = ruleAndKind?.kind ?: return null
return if (index != ruleStatusIndex) {
if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) {
when (index) {
NOTIFICATION_OFF_INDEX -> {
safeRule.copy(enabled = true)
.setNotify(false)
.removeNotificationSound()
}
NOTIFICATION_SILENT_INDEX -> {
safeRule.copy(enabled = false)
.setNotify(false)
}
NOTIFICATION_NOISY_INDEX -> {
safeRule.copy(enabled = true)
.setNotify(true)
.setNotificationSound()
}
else -> safeRule
}
} else {
if (NOTIFICATION_OFF_INDEX == index) {
if (safeKind == RuleSetKey.UNDERRIDE || safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) {
safeRule.setNotify(false)
} else {
safeRule.copy(enabled = false)
}
} else {
val newRule = safeRule.copy(enabled = true)
.setNotify(true)
.setHighlight(safeKind != RuleSetKey.UNDERRIDE
&& safeRule.ruleId != RuleIds.RULE_ID_INVITE_ME
&& NOTIFICATION_NOISY_INDEX == index)
if (NOTIFICATION_NOISY_INDEX == index) {
newRule.setNotificationSound(
if (safeRule.ruleId == RuleIds.RULE_ID_CALL) {
Action.ACTION_OBJECT_VALUE_VALUE_RING
} else {
Action.ACTION_OBJECT_VALUE_VALUE_DEFAULT
}
)
} else {
newRule.removeNotificationSound()
}
}
}
} else {
safeRule
}
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
@ -170,14 +82,14 @@ class PushRulePreference : VectorPreference {
val radioGroup = holder.findViewById(R.id.bingPreferenceRadioGroup) as? RadioGroup
radioGroup?.setOnCheckedChangeListener(null)
when (ruleStatusIndex) {
NOTIFICATION_OFF_INDEX -> {
when (index) {
NotificationIndex.OFF -> {
radioGroup?.check(R.id.bingPreferenceRadioBingRuleOff)
}
NOTIFICATION_SILENT_INDEX -> {
NotificationIndex.SILENT -> {
radioGroup?.check(R.id.bingPreferenceRadioBingRuleSilent)
}
else -> {
NotificationIndex.NOISY -> {
radioGroup?.check(R.id.bingPreferenceRadioBingRuleNoisy)
}
}
@ -185,23 +97,15 @@ class PushRulePreference : VectorPreference {
radioGroup?.setOnCheckedChangeListener { _, checkedId ->
when (checkedId) {
R.id.bingPreferenceRadioBingRuleOff -> {
onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_OFF_INDEX)
onPreferenceChangeListener?.onPreferenceChange(this, NotificationIndex.OFF)
}
R.id.bingPreferenceRadioBingRuleSilent -> {
onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_SILENT_INDEX)
onPreferenceChangeListener?.onPreferenceChange(this, NotificationIndex.SILENT)
}
R.id.bingPreferenceRadioBingRuleNoisy -> {
onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_NOISY_INDEX)
onPreferenceChangeListener?.onPreferenceChange(this, NotificationIndex.NOISY)
}
}
}
}
companion object {
// index in mRuleStatuses
private const val NOTIFICATION_OFF_INDEX = 0
private const val NOTIFICATION_SILENT_INDEX = 1
private const val NOTIFICATION_NOISY_INDEX = 2
}
}

View File

@ -27,6 +27,7 @@ import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityVectorSettingsBinding
import im.vector.app.features.settings.devices.VectorSettingsDevicesFragment
import im.vector.app.features.settings.notifications.VectorSettingsNotificationPreferenceFragment
import org.matrix.android.sdk.api.failure.GlobalError
import org.matrix.android.sdk.api.session.Session

View File

@ -0,0 +1,92 @@
/*
* Copyright (c) 2021 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.app.features.settings.notifications
import im.vector.app.core.preference.PushRulePreference
import org.matrix.android.sdk.api.pushrules.RuleIds
fun getStandardAction(ruleId: String, index: PushRulePreference.NotificationIndex): StandardActions? {
return when (ruleId) {
RuleIds.RULE_ID_CONTAIN_DISPLAY_NAME ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.Disabled
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.HighlightDefaultSound
}
RuleIds.RULE_ID_CONTAIN_USER_NAME ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.Disabled
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.HighlightDefaultSound
}
RuleIds.RULE_ID_ROOM_NOTIF ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.Disabled
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.Highlight
}
RuleIds.RULE_ID_ONE_TO_ONE_ROOM ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.DontNotify
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.NotifyDefaultSound
}
RuleIds.RULE_ID_ONE_TO_ONE_ENCRYPTED_ROOM ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.DontNotify
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.NotifyDefaultSound
}
RuleIds.RULE_ID_ALL_OTHER_MESSAGES_ROOMS ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.DontNotify
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.NotifyDefaultSound
}
RuleIds.RULE_ID_ENCRYPTED ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.DontNotify
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.NotifyDefaultSound
}
RuleIds.RULE_ID_INVITE_ME ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.Disabled
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.NotifyDefaultSound
}
RuleIds.RULE_ID_CALL ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.Disabled
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.NotifyRingSound
}
RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.DontNotify
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Disabled
PushRulePreference.NotificationIndex.NOISY -> StandardActions.NotifyDefaultSound
}
RuleIds.RULE_ID_TOMBSTONE ->
when (index) {
PushRulePreference.NotificationIndex.OFF -> StandardActions.Disabled
PushRulePreference.NotificationIndex.SILENT -> StandardActions.Notify
PushRulePreference.NotificationIndex.NOISY -> StandardActions.Highlight
}
else -> null
}
}

View File

@ -0,0 +1,31 @@
/*
* Copyright (c) 2021 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.app.features.settings.notifications
import org.matrix.android.sdk.api.pushrules.Action
sealed class StandardActions(
val actions: List<Action>?
) {
object Notify : StandardActions(actions = listOf(Action.Notify))
object NotifyDefaultSound : StandardActions(actions = listOf(Action.Notify, Action.Sound()))
object NotifyRingSound : StandardActions(actions = listOf(Action.Notify, Action.Sound(sound = Action.ACTION_OBJECT_VALUE_VALUE_RING)))
object Highlight : StandardActions(actions = listOf(Action.Notify, Action.Highlight(highlight = true)))
object HighlightDefaultSound : StandardActions(actions = listOf(Action.Notify, Action.Highlight(highlight = true), Action.Sound()))
object DontNotify : StandardActions(actions = listOf(Action.DoNotNotify))
object Disabled : StandardActions(actions = null)
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2018 New Vector Ltd
* Copyright (c) 2021 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -13,17 +13,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.app.features.settings
package im.vector.app.features.settings.notifications
import androidx.lifecycle.lifecycleScope
import androidx.preference.Preference
import im.vector.app.R
import im.vector.app.core.preference.PushRulePreference.NotificationIndex
import im.vector.app.core.preference.PushRulePreference
import im.vector.app.core.preference.VectorPreference
import im.vector.app.core.utils.toast
import im.vector.app.features.settings.VectorSettingsBaseFragment
import kotlinx.coroutines.launch
import org.matrix.android.sdk.api.pushrules.RuleIds
import org.matrix.android.sdk.api.pushrules.rest.PushRule
import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind
import org.matrix.android.sdk.api.pushrules.toJson
import javax.inject.Inject
class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor()
@ -45,24 +49,29 @@ class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor()
preference.isVisible = false
} else {
preference.isVisible = true
preference.setPushRule(ruleAndKind)
val initialIndex = getNotificationIndexForRule(ruleAndKind.pushRule)
preference.setIndex(initialIndex)
preference.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue ->
val newRule = preference.createNewRule(newValue as Int)
if (newRule != null) {
val newIndex = newValue as NotificationIndex
val standardAction = getStandardAction(ruleAndKind.pushRule.ruleId, newIndex)
if (standardAction != null) {
val enabled = standardAction != StandardActions.Disabled
val newActions = standardAction.actions
displayLoadingView()
lifecycleScope.launch {
val result = runCatching {
session.updatePushRuleActions(ruleAndKind.kind,
preference.ruleAndKind?.pushRule ?: ruleAndKind.pushRule,
newRule)
ruleAndKind.pushRule.ruleId,
enabled,
newActions)
}
if (!isAdded) {
return@launch
}
hideLoadingView()
result.onSuccess {
preference.setPushRule(ruleAndKind.copy(pushRule = newRule))
preference.setIndex(newIndex)
}
result.onFailure { failure ->
// Restore the previous value
@ -78,6 +87,28 @@ class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor()
}
}
private fun getNotificationIndexForRule(rule: PushRule): NotificationIndex? {
return NotificationIndex.values().firstOrNull {
// Get the actions for the index
val standardAction = getStandardAction(rule.ruleId, it) ?: return@firstOrNull false
val indexActions = standardAction.actions ?: listOf()
// Check if the input rule matches a rule generated from the static rule definitions
val targetRule = rule.copy(enabled = standardAction != StandardActions.Disabled, actions = indexActions.toJson())
ruleMatches(rule, targetRule)
}
}
private fun ruleMatches(rule: PushRule, targetRule: PushRule): Boolean {
// Rules match if both are disabled, or if both are enabled and their highlight/sound/notify actions match up.
return (!rule.enabled && !targetRule.enabled)
|| (rule.enabled
&& targetRule.enabled
&& rule.getHighlight() == targetRule.getHighlight()
&& rule.getNotificationSound() == targetRule.getNotificationSound()
&& rule.shouldNotify() == targetRule.shouldNotify()
&& rule.shouldNotNotify() == targetRule.shouldNotNotify())
}
private fun refreshDisplay() {
listView?.adapter?.notifyDataSetChanged()
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019 New Vector Ltd
* Copyright (c) 2021 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License.
*/
package im.vector.app.features.settings
package im.vector.app.features.settings.notifications
import android.app.Activity
import android.content.Context
@ -37,6 +37,11 @@ import im.vector.app.core.pushers.PushersManager
import im.vector.app.core.utils.isIgnoringBatteryOptimizations
import im.vector.app.core.utils.requestDisablingBatteryOptimization
import im.vector.app.features.notifications.NotificationUtils
import im.vector.app.features.settings.BackgroundSyncMode
import im.vector.app.features.settings.BackgroundSyncModeChooserDialog
import im.vector.app.features.settings.VectorPreferences
import im.vector.app.features.settings.VectorSettingsBaseFragment
import im.vector.app.features.settings.VectorSettingsFragmentInteractionListener
import im.vector.app.push.fcm.FcmHelper
import kotlinx.coroutines.launch
import org.matrix.android.sdk.api.extensions.tryOrNull

View File

@ -1,5 +1,5 @@
/*
* Copyright 2018 New Vector Ltd
* Copyright (c) 2021 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.app.features.settings
package im.vector.app.features.settings.notifications
import android.app.Activity
import android.content.BroadcastReceiver
@ -36,6 +36,7 @@ import im.vector.app.core.platform.VectorBaseFragment
import im.vector.app.databinding.FragmentSettingsNotificationsTroubleshootBinding
import im.vector.app.features.notifications.NotificationUtils
import im.vector.app.features.rageshake.BugReporter
import im.vector.app.features.settings.VectorSettingsFragmentInteractionListener
import im.vector.app.features.settings.troubleshoot.NotificationTroubleshootTestManager
import im.vector.app.features.settings.troubleshoot.TroubleshootTest
import im.vector.app.push.fcm.NotificationTroubleshootTestManagerFactory

View File

@ -26,7 +26,7 @@
android:persistent="false"
android:summary="@string/settings_notification_advanced_summary"
android:title="@string/settings_notification_advanced"
app:fragment="im.vector.app.features.settings.VectorSettingsAdvancedNotificationPreferenceFragment" />
app:fragment="im.vector.app.features.settings.notifications.VectorSettingsAdvancedNotificationPreferenceFragment" />
</im.vector.app.core.preference.VectorPreferenceCategory>

View File

@ -16,7 +16,7 @@
<im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_notification"
android:title="@string/settings_notifications"
app:fragment="im.vector.app.features.settings.VectorSettingsNotificationPreferenceFragment" />
app:fragment="im.vector.app.features.settings.notifications.VectorSettingsNotificationPreferenceFragment" />
<im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_preferences"