internal void RefreshCategories(bool invalidate) { categoriesReady = false; Log.Info(TAG, "RefreshCategories " + invalidate); categories = DataStore.LoadCategories(); categoryTags = new List <List <TagRec> >(); foreach (var category in categories.Select((x, i) => new { rec = x, index = i })) { List <TagRec> tags = DataStore.LoadTags(category.rec.id); categoryTags.Add(tags); } categoriesReady = true; if (invalidate) { ((MainActivity)Context).RunOnUiThread(() => { Log.Info(TAG, "Invalidate on UI thread"); Invalidate(); }); } }
public void Fill(int category_id) { items = DataStore.LoadTags(category_id); }