public override async Task OnStart() { if (_isHandlingStart) { return; } _isHandlingStart = true; await _userManager.LoadUser(); Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(this, MessagingEvents.AppLoadFinished, GetMainPage())); if (App.Settings.SetupFinished) { await _friendsManager.LoadFriendsFromStore(); await _contactsManager.LoadContactsAsync(); await _friendsManager.ManageFriends(_contactsManager.Contacts); await _chatService.Connect(); } _isHandlingStart = false; }
private async Task Start() { await _userManager.LoadUser(); if (AuthenticationService.CanRequestToken()) { await AuthenticationService.RequestToken(true); } Device.BeginInvokeOnMainThread(() => MessagingCenter.Send(this, MessagingEvents.AppLoadFinished, GetMainPage())); if (App.Settings.SetupFinished) { await _friendsManager.LoadFriends(); await _contactsManager.LoadContactsAsync(); await _friendsManager.ManageFriends(_contactsManager.Contacts); await _chatService.Connect(); } }