protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            globalSettings = new GlobalSettings(this.Frame);
            if (e.Parameter is Media)
            {
                Media m = e.Parameter as Media;
                _viewModel = new ImageViewModel(m);
                pageTitle.Text = "Tabstagram - " + _viewModel.CurrentUser.username;
            }
            else if (e.Parameter is User)
            {
                User u = e.Parameter as User;
                _viewModel = new ImageViewModel(u);
                pageTitle.Text = "Tabstagram - " + u.username;
            }

            _viewModel.CriticalNetworkErrorNotice += OnErrorNotice;
            pageRoot.DataContext = _viewModel;

            if (MarkedButton == null || VisibleGrid == null)
            {
                SwitchMarkedButton(CommentsButton);
                SwitchVisibleGrid(CommentsGrid);
            }

            if (!this.settingsMenuRegistered)
            {
                SettingsPane.GetForCurrentView().CommandsRequested += globalSettings.onCommandsRequested;
                this.settingsMenuRegistered = true;
            }

            base.OnNavigatedTo(e);
        }
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (UserSettings.MediaListChanged)
            {
                await _lvm.Reset();
                UserSettings.MediaListChanged = false;
            }

            globalSettings = new GlobalSettings(this.Frame);
            SearchPane.GetForCurrentView().ShowOnKeyboardInput = true;

            //Set the same itemsource for zoomedIn and zoomedOut
            var collectionGroups = groupedItemsViewSource.View.CollectionGroups;
            ((ListViewBase)this.Zoom.ZoomedOutView).ItemsSource = collectionGroups;

            if (!this.settingsMenuRegistered)
            {
                SettingsPane.GetForCurrentView().CommandsRequested += globalSettings.onCommandsRequested;
                this.settingsMenuRegistered = true;
            }

            if (UserSettings.FollowTabstagram)
            {
                try
                {
                    await Instagram.Follow("229801072");
                    UserSettings.FollowTabstagram = false;
                }
                catch (Exception)
                {
                    Debug.WriteLine("Error when trying to follow Tabstagram from checkbox");
                }
            }
        }