forked from mirror/monocles_chat_clean
Use known gateways in notification settings
(cherry picked from commit d7cde840a612538b2673091874b8af83948b98c0)
This commit is contained in:
parent
623824bfd5
commit
c79651fc57
1 changed files with 1 additions and 9 deletions
|
@ -143,15 +143,7 @@ public class NotificationsSettingsFragment extends XmppPreferenceFragment {
|
||||||
boolean diallerIntegrationPossible = false;
|
boolean diallerIntegrationPossible = false;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 23) {
|
if (Build.VERSION.SDK_INT >= 23) {
|
||||||
outer:
|
diallerIntegrationPossible = requireService().getAccounts().stream().anyMatch(a -> a.getGateways("pstn").size() > 0);
|
||||||
for (final var account : requireService().getAccounts()) {
|
|
||||||
for (final var contact : account.getRoster().getContacts()) {
|
|
||||||
if (contact.getPresences().anyIdentity("gateway", "pstn")) {
|
|
||||||
diallerIntegrationPossible = true;
|
|
||||||
break outer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!diallerIntegrationPossible) {
|
if (!diallerIntegrationPossible) {
|
||||||
final var pref = findPreference("dialler_integration_incoming");
|
final var pref = findPreference("dialler_integration_incoming");
|
||||||
|
|
Loading…
Reference in a new issue