private async void AddToSelectedGroupButton_Clicked(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(_selectedGroupName))
            {
                Device.BeginInvokeOnMainThread(() => HomePage.ShowMessage(notificationMessageView, "No group selected"));
                return;
            }

            foreach (var group in HomePage.ContactsGrouped)
            {
                foreach (var contact in group)
                {
                    if (contact.IsSelected)
                    {
                        contact.Group = _selectedGroupName;
                    }
                }
            }

            // Save the updated contact
            HomePage.Instance.SaveContactList();

            RefreshListView(true);

            GroupContactsPage page = new GroupContactsPage(_selectedGroupName);

            page.PageClosing += GroupContactsPage_PageClosing;
            await PopupNavigation.Instance.PushAsync(page);

            await PopupNavigation.Instance.RemovePageAsync(this, false);
        }
Example #2
0
        private async void GroupsListView_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            GroupsPageItem tappedItem = e.Item as GroupsPageItem;

            GroupContactsPage page = new GroupContactsPage(tappedItem.GroupName);

            page.PageClosing += GroupContactsPage_PageClosing;
            await PopupNavigation.Instance.PushAsync(page);
        }