Skip to content

Commit

Permalink
Add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Renaud committed Feb 14, 2023
1 parent 2cb1ea9 commit 0a0ad2d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import kotlinx.coroutines.launch
import org.matrix.android.sdk.api.session.pushrules.RuleIds
import org.matrix.android.sdk.api.session.pushrules.rest.PushRuleAndKind

// TODO This fragment seems not used anymore, we can probably delete it
@AndroidEntryPoint
class VectorSettingsAdvancedNotificationPreferenceFragment :
VectorSettingsBaseFragment() {
Expand All @@ -43,7 +44,7 @@ class VectorSettingsAdvancedNotificationPreferenceFragment :
for (preferenceKey in prefKeyToPushRuleId.keys) {
val preference = findPreference<VectorPreference>(preferenceKey)
if (preference is PushRulePreference) {
val ruleAndKind: PushRuleAndKind? = session.pushRuleService().getPushRules().findDefaultRule(prefKeyToPushRuleId[preferenceKey])
val ruleAndKind: PushRuleAndKind? = prefKeyToPushRuleId[preferenceKey]?.let { session.pushRuleService().getPushRules().findDefaultRule(it) }

if (ruleAndKind == null) {
// The rule is not defined, hide the preference
Expand Down

0 comments on commit 0a0ad2d

Please sign in to comment.