Exemple #1
0
        private void OnMessageUserAuthChanged(MessageUserAuthChanged message)
        {
            if (!message.IsLoggedIn)
            {
                _currentTitle  = null;
                _currentArtist = null;

                ArtistImage = null;
                TrackImage  = null;

                AudioService.Instance.Stop();
            }
        }
Exemple #2
0
        private void OnMessageUserAuthChanged(MessageUserAuthChanged message)
        {
            if (message.IsLoggedIn)
            {
                LoadCurrentUser();
            }
            else
            {
                if (AppState.VkToken == null) //if we already logged out, do nothing
                {
                    return;
                }

                CurrentUser = null;
                AppState.Reset();

                App.Current.NavigationService.Navigate(typeof(LoginView), clearHistory: true);
            }
        }