private async Task DoRefresh()
{
if (_curTab != null)
{
TabModel tab;
if (!this._statuses.Tabs.TryGetValue(this._curTab.Text, out tab))
return;
switch (_statuses.Tabs[_curTab.Text].TabType)
{
case MyCommon.TabUsageType.Mentions:
await this.GetReplyAsync();
break;
case MyCommon.TabUsageType.DirectMessage:
await this.GetDirectMessagesAsync();
break;
case MyCommon.TabUsageType.Favorites:
await this.GetFavoritesAsync();
break;
//case MyCommon.TabUsageType.Profile:
//// TODO
case MyCommon.TabUsageType.PublicSearch:
var searchTab = (PublicSearchTabModel)tab;
if (string.IsNullOrEmpty(searchTab.SearchWords)) return;
await this.GetPublicSearchAsync(searchTab);
break;
case MyCommon.TabUsageType.UserTimeline:
await this.GetUserTimelineAsync((UserTimelineTabModel)tab);
break;
case MyCommon.TabUsageType.Lists:
var listTab = (ListTimelineTabModel)tab;
if (listTab.ListInfo == null || listTab.ListInfo.Id == 0) return;
await this.GetListTimelineAsync(listTab);
break;
default:
await this.GetHomeTimelineAsync();
break;
}
}
else
{
await this.GetHomeTimelineAsync();
}
}