mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Take into account the identity server when setting the default value of showLocalContacts.
This commit is contained in:
@@ -80,7 +80,6 @@
|
||||
_areSectionsShrinkable = NO;
|
||||
shrinkedSectionsBitMask = 0;
|
||||
|
||||
_showLocalContacts = MXKAppSettings.standardAppSettings.syncLocalContacts;
|
||||
hideNonMatrixEnabledContacts = NO;
|
||||
|
||||
_displaySearchInputInContactsList = NO;
|
||||
@@ -93,6 +92,16 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithMatrixSession:(MXSession *)mxSession
|
||||
{
|
||||
self = [super initWithMatrixSession:mxSession];
|
||||
if (self) {
|
||||
// Only show local contacts when contact sync is enabled and the identity server terms of service have been accepted.
|
||||
_showLocalContacts = MXKAppSettings.standardAppSettings.syncLocalContacts && self.mxSession.hasAccountDataIdentityServerValue;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)destroy
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:kMXKContactManagerDidUpdateMatrixContactsNotification object:nil];
|
||||
|
||||
Reference in New Issue
Block a user