mirror of
https://github.com/bitwarden/mobile.git
synced 2024-12-19 15:48:21 +01:00
page name for groupings
This commit is contained in:
parent
4f4c6064db
commit
f0a96759a4
@ -7,7 +7,7 @@ namespace Bit.App.Pages
|
|||||||
{
|
{
|
||||||
public TabsPage()
|
public TabsPage()
|
||||||
{
|
{
|
||||||
var groupingsPage = new NavigationPage(new GroupingsPage())
|
var groupingsPage = new NavigationPage(new GroupingsPage(true))
|
||||||
{
|
{
|
||||||
Title = AppResources.MyVault,
|
Title = AppResources.MyVault,
|
||||||
Icon = "lock.png"
|
Icon = "lock.png"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using Bit.Core.Abstractions;
|
using Bit.Core.Abstractions;
|
||||||
using Bit.Core.Enums;
|
using Bit.Core.Enums;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
@ -12,14 +13,12 @@ namespace Bit.App.Pages
|
|||||||
private readonly IBroadcasterService _broadcasterService;
|
private readonly IBroadcasterService _broadcasterService;
|
||||||
private readonly ISyncService _syncService;
|
private readonly ISyncService _syncService;
|
||||||
private readonly GroupingsPageViewModel _vm;
|
private readonly GroupingsPageViewModel _vm;
|
||||||
|
private readonly string _pageName;
|
||||||
public GroupingsPage()
|
|
||||||
: this(true)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
public GroupingsPage(bool mainPage, CipherType? type = null, string folderId = null,
|
public GroupingsPage(bool mainPage, CipherType? type = null, string folderId = null,
|
||||||
string collectionId = null, string pageTitle = null)
|
string collectionId = null, string pageTitle = null)
|
||||||
{
|
{
|
||||||
|
_pageName = string.Concat(nameof(GroupingsPage), "_", DateTime.UtcNow.Ticks);
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
SetActivityIndicator(_mainContent);
|
SetActivityIndicator(_mainContent);
|
||||||
_broadcasterService = ServiceContainer.Resolve<IBroadcasterService>("broadcasterService");
|
_broadcasterService = ServiceContainer.Resolve<IBroadcasterService>("broadcasterService");
|
||||||
@ -49,7 +48,7 @@ namespace Bit.App.Pages
|
|||||||
{
|
{
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
// await _syncService.FullSyncAsync(true);
|
// await _syncService.FullSyncAsync(true);
|
||||||
_broadcasterService.Subscribe(nameof(GroupingsPage), async (message) =>
|
_broadcasterService.Subscribe(_pageName, async (message) =>
|
||||||
{
|
{
|
||||||
if(message.Command == "syncCompleted")
|
if(message.Command == "syncCompleted")
|
||||||
{
|
{
|
||||||
@ -78,7 +77,7 @@ namespace Bit.App.Pages
|
|||||||
protected override void OnDisappearing()
|
protected override void OnDisappearing()
|
||||||
{
|
{
|
||||||
base.OnDisappearing();
|
base.OnDisappearing();
|
||||||
_broadcasterService.Unsubscribe(nameof(GroupingsPage));
|
_broadcasterService.Unsubscribe(_pageName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void RowSelected(object sender, SelectedItemChangedEventArgs e)
|
private async void RowSelected(object sender, SelectedItemChangedEventArgs e)
|
||||||
|
Loading…
Reference in New Issue
Block a user