private async void tw_NewPostFromStream(object sender, EventArgs e)
{
if (this._cfgCommon.ReadOldPosts)
{
_statuses.SetReadHomeTab(); //新着時未読クリア
}
this._statuses.DistributePosts();
if (this._cfgCommon.UserstreamPeriod > 0) return;
// userStreamsRefreshing が 0 (インクリメント後は1) であれば RefreshTimeline を実行
if (Interlocked.Increment(ref this.userStreamsRefreshing) == 1)
{
try
{
await this.InvokeAsync(() => this.RefreshTimeline())
.ConfigureAwait(false);
}
finally
{
Interlocked.Exchange(ref this.userStreamsRefreshing, 0);
}
}
}