Esempio n. 1
0
        private async Task RefreshCategoriesAsync()
        {
            await DialogService.DisplayPopupAsync();

            var categoriesList = await FirebaseService.GetCategoriesAsync(20, null);

            if (categoriesList == null)
            {
                categoriesList = new List <CategoryModel>();
            }

            Categories = new ObservableCollection <CategoryModel>(categoriesList);
            await DialogService.PopAsync();
        }
Esempio n. 2
0
        private async Task LoadMoreCategoriesAsync()
        {
            if (!await CanLoadMoreAsync())
            {
                return;
            }

            var categoriesList = await FirebaseService.GetCategoriesAsync(10, Categories.Last().ID);

            if (categoriesList == null)
            {
                return;
            }

            foreach (var category in categoriesList)
            {
                Categories.Add(category);
            }
        }