Merge branch 'master' of gitlab.linphone.org:BC/public/linphone-iphone

This commit is contained in:
Christophe Deschamps 2021-09-17 10:28:20 +02:00
commit 4dd347a297
3 changed files with 11 additions and 5 deletions

View file

@ -991,6 +991,7 @@ static UICompositeViewDescription *compositeDescription = nil;
// we successfully loaded a remote provisioned config, go to dialer
[LinphoneManager.instance lpConfigSetInt:[NSDate new].timeIntervalSince1970
forKey:@"must_link_account_time"];
[LinphoneManager.instance configurePushProviderForAccounts];
if (number_of_accounts_before < bctbx_list_size(linphone_core_get_account_list(LC))) {
LOGI(@"A proxy config was set up with the remote provisioning, skip assistant");
[self onDialerClick:nil];

View file

@ -113,6 +113,7 @@ typedef struct _LinphoneManagerSounds {
+ (NSString *)getUserAgent;
+ (int)unreadMessageCount;
- (void)configurePushProviderForAccounts;
- (void)playMessageSound;
- (void)resetLinphoneCore;
- (void)launchLinphoneCore;

View file

@ -1305,11 +1305,7 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
}
}
- (void)startLinphoneCore {
bool corePushEnabled = [self lpConfigIntForKey:@"net" inSection:@"push_notification"];
linphone_core_set_push_notification_enabled([LinphoneManager getLc], corePushEnabled);
linphone_core_start([LinphoneManager getLc]);
- (void)configurePushProviderForAccounts {
const MSList *accountsList = linphone_core_get_account_list(theLinphoneCore);
while (accountsList) {
LinphoneAccount * account = accountsList->data;
@ -1332,6 +1328,14 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
}
}
- (void)startLinphoneCore {
bool corePushEnabled = [self lpConfigIntForKey:@"net" inSection:@"push_notification"];
linphone_core_set_push_notification_enabled([LinphoneManager getLc], corePushEnabled);
linphone_core_start([LinphoneManager getLc]);
[self configurePushProviderForAccounts];
}
- (void)createLinphoneCore {
[self migrationAllPre];
if (theLinphoneCore != nil) {