var currentPost = this.CurrentPost;
if (currentPost != null && statusId == currentPost.StatusId)
- await this.DispSelectedPost(true); // 選択アイテム再表示
+ this.DispSelectedPost(true); // 選択アイテム再表示
}
}
var currentPost = this.CurrentPost;
if (currentPost != null && successIds.Contains(currentPost.StatusId))
- await this.DispSelectedPost(true); // 選択アイテム再表示
+ this.DispSelectedPost(true); // 選択アイテム再表示
}
}
}
}
}
- private async void ListTab_SelectedIndexChanged(object sender, EventArgs e)
+ private void ListTab_SelectedIndexChanged(object sender, EventArgs e)
{
//_curList.Refresh();
SetMainWindowTitle();
this.Tag = ListTab.Tag;
TabMenuControl(this.CurrentTabName);
this.PushSelectPostChain();
- await DispSelectedPost();
+ DispSelectedPost();
}
private void SetListProperty()
}
}
- private async Task UpdateSelectedPost()
+ private void UpdateSelectedPost()
{
//件数関連の場合、タイトル即時書き換え
if (SettingManager.Common.DispLatestPost != MyCommon.DispTitleEnum.None &&
this.ListTab.Refresh();
}
- await this.DispSelectedPost();
+ this.DispSelectedPost();
}
public string createDetailHtml(string orgdata)
=> detailHtmlFormatHeader + orgdata + detailHtmlFormatFooter;
- private Task DispSelectedPost()
+ private void DispSelectedPost()
=> this.DispSelectedPost(false);
private PostClass displayPost = new PostClass();
/// </summary>
private CancellationTokenSource thumbnailTokenSource = null;
- private async Task DispSelectedPost(bool forceupdate)
+ private void DispSelectedPost(bool forceupdate)
{
var currentPost = this.CurrentPost;
if (currentPost == null)
loadTasks.Add(this.tweetThumbnail1.ShowThumbnailAsync(currentPost, token));
}
- try
+ async Task delayedTasks()
{
- await Task.WhenAll(loadTasks);
+ try
+ {
+ await Task.WhenAll(loadTasks);
+ }
+ catch (OperationCanceledException) { }
}
- catch (OperationCanceledException) { }
+
+ // サムネイルの読み込みを待たずに次に選択されたツイートを表示するため await しない
+ _ = delayedTasks();
}
private async void MatomeMenuItem_Click(object sender, EventArgs e)
private async Task doGetFollowersMenu()
{
await this.RefreshFollowerIdsAsync();
- await this.DispSelectedPost(true);
+ this.DispSelectedPost(true);
}
private async void GetFollowersAllToolStripMenuItem_Click(object sender, EventArgs e)
return WebUtility.HtmlDecode(statusHtml);
}
- private async void DumpPostClassToolStripMenuItem_Click(object sender, EventArgs e)
+ private void DumpPostClassToolStripMenuItem_Click(object sender, EventArgs e)
{
this.tweetDetailsView.DumpPostClass = this.DumpPostClassToolStripMenuItem.Checked;
if (this.CurrentPost != null)
- await this.DispSelectedPost(true);
+ this.DispSelectedPost(true);
}
private void MenuItemHelp_DropDownOpening(object sender, EventArgs e)
{
if (InvokeRequired && !IsDisposed)
{
- await this.InvokeAsync(async () =>
+ await this.InvokeAsync(() =>
{
this._statuses.RemovePostFromAllTabs(e.StatusId, setIsDeleted: true);
if (this.CurrentTab.Contains(e.StatusId))
this.CurrentListView.Update();
var post = this.CurrentPost;
if (post != null && post.StatusId == e.StatusId)
- await this.DispSelectedPost(true);
+ this.DispSelectedPost(true);
}
});
return;
if (e.Mode == Microsoft.Win32.PowerModes.Resume) osResumed = true;
}
- private async void SystemEvents_TimeChanged(object sender, EventArgs e)
+ private void SystemEvents_TimeChanged(object sender, EventArgs e)
{
var prevTimeOffset = TimeZoneInfo.Local.BaseUtcOffset;
this.PurgeListViewItemCache();
this.CurrentListView.Refresh();
- await this.DispSelectedPost(forceupdate: true);
+ this.DispSelectedPost(forceupdate: true);
}
}