Ejemplo n.º 1
0
        private void OnAuthChanged(AuthChangedMessage msg)
        {
            if (msg.AuthManager.IsAuthenticated)
            {
                return;
            }

            // Reset last run on logout
            LastRun = null;
        }
Ejemplo n.º 2
0
        private void OnAuthChangedMessage (AuthChangedMessage msg)
        {
            var hasGcm = HasGcmSupport;
            var authManager = ServiceContainer.Resolve<AuthManager> ();

            if (hasGcm) {
                UnregisterDevice ();
            }

            // Update cached data
            authToken = authManager.Token;

            if (authManager.IsAuthenticated) {
                if (hasGcm) {
                    RegisterDevice ();
                }
            }
        }
Ejemplo n.º 3
0
 private void OnAuthChanged (AuthChangedMessage msg)
 {
     ResetRootViewController ();
 }
Ejemplo n.º 4
0
 private void OnAuthChanged (AuthChangedMessage msg)
 {
     checkActions ();
 }
 private void OnAuthChanged (AuthChangedMessage msg)
 {
     SyncNotification ();
 }
Ejemplo n.º 6
0
 private void OnAuthChangedMessage (AuthChangedMessage msg)
 {
     currentUser = ServiceContainer.Resolve<AuthManager> ().User;
     OnUserChanged ();
 }
Ejemplo n.º 7
0
 private void OnAuthChanged (AuthChangedMessage msg)
 {
     // Start a new session whenever the user changes, exception being signup where the user just created an account
     if (msg.Reason != AuthChangeReason.Signup) {
         UserPlan = Plan.None;
         StartNewSession ();
     }
 }
Ejemplo n.º 8
0
        private async void OnAuthChangedMessage (AuthChangedMessage msg)
        {
            var authManager = ServiceContainer.Resolve<AuthManager> ();

            if (APNsIsEnabled && SavedDeviceToken != null) {
                if (authManager.IsAuthenticated) {
                    await RegisterDeviceOnTogglServiceAsync (SavedDeviceToken, authManager.Token);
                    userToken = authManager.Token;
                } else {
                    await UnregisterDeviceFromTogglServiceAsync (SavedDeviceToken, userToken);
                }
            } else if (authManager.IsAuthenticated) {
                RegisterDeviceOnAPNs ();
            }
        }