public void OnChannelClick(object sender, NavigationView.NavigationItemSelectedEventArgs navigationItemSelectedEventArgs) { string itemText = navigationItemSelectedEventArgs.MenuItem.TitleFormatted.ToString(); if (itemText == UiHelpers.CreateChannelLabel) { UiHelpers.ShowChannelDialog(this) .ContinueWith(ta => { string nChannel = ta.Result; var nChannels = new List <string>(client.Channels) { nChannel }; UiHelpers.ResetChannelDrawer(this, navigationView, nChannels.ToArray()); client.ChangeChannel(ta.Result, cmdReceiver) .Error(ex => errors.Add(ex)); }); } else { //Change channel client.ChangeChannel(itemText, cmdReceiver); } drawerLayout.CloseDrawer(navigationView); }
protected override void OnPostCreate(Bundle savedInstanceState) { base.OnPostCreate(savedInstanceState); this.UpdateCookiesFromIntent(client); drawerToggle.SyncState(); UiHelpers.ResetChannelDrawer(this, navigationView, client.Channels); client.Connect().ConfigureAwait(false); }