async Task <List <NewsCategory> > GetUsersNewsCategories()
        {
            try
            {
                var loggedIn = authService.IsLoggedIn();

                if (!loggedIn)
                {
                    return(new List <NewsCategory>());
                }

                var dbResult = await Data.ListAsync <UserInterests>(
                    DefaultPartitions.UserDocuments
                    );

                var allNewsCats   = new AllNewsCategories();
                var userInterests = new List <UserInterests>();

                userInterests.AddRange(dbResult.CurrentPage.Items.Select(i => i.DeserializedValue));

                while (dbResult.HasNextPage)
                {
                    await dbResult.GetNextPageAsync();

                    userInterests.AddRange(dbResult.CurrentPage.Items.Select(i => i.DeserializedValue));
                }

                foreach (var interest in userInterests)
                {
                    var favoriteCategory = allNewsCats.First(c => c.CategoryName == interest.NewsCategoryName);
                    favoriteCategory.IsFavorite = true;

                    // add the tabs
                    var interestInfo = new InterestSubMessage
                    {
                        Category = favoriteCategory.CategoryName,
                        Title    = favoriteCategory.DisplayName
                    };

                    var msg = new AddInterestTabMessage {
                        InterestInfo = interestInfo
                    };

                    MessagingCenter.Send(msg, AddInterestTabMessage.AddTabMessage);
                }

                return(allNewsCats);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);

                return(new List <NewsCategory>());
            }
        }
        async Task CreateFavorite(NewsCategory newsCategory)
        {
            await Data.CreateAsync <UserInterest>(newsCategory.CategoryName,
                                                  new UserInterest { NewsCategoryName = newsCategory.CategoryName },
                                                  DefaultPartitions.UserDocuments);

            // Tell the App Shell to add a new interest tab
            var interestInfo = new InterestSubMessage
            {
                Category = newsCategory.CategoryName,
                Title    = newsCategory.DisplayName
            };

            var msg = new AddInterestTabMessage {
                InterestInfo = interestInfo
            };

            MessagingCenter.Send(msg, AddInterestTabMessage.AddTabMessage);
        }