private async Task GetMonths() { var months = await _apiMonths.Get(_currentState.Channel); if (months == null) { return; } _currentState.Channel.Months = new ObservableCollection <IMonthModel>(months); MonthsList = _currentState.Channel.Months; }
public async Task <List <IMessageModel> > Get(string user, string channel) { var months = await _apiMonths.Get(channel); var monthList = new List <IMessageModel>(); foreach (var monthModel in months) { var url = $"{monthModel.Url}/userlogs/{user}.txt"; monthList.Add(new MessageModel(null, monthModel.Name, url, this)); } //if (monthList.Count > 0) { // monthList[0]; //} return(monthList); }