: base(innerHandler)
{
foreach (var address in Dns.GetHostAddresses("pbs.twimg.com"))
+ {
if (address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
this.ipv4Address = address;
+ }
}
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
var parameter = GetOAuthParameter(consumerKey, token);
// OAuth共通情報にquery情報を追加
if (query != null)
+ {
foreach (var (key, value) in query)
parameter.Add(key, value);
+ }
// 署名の作成・追加
parameter.Add("oauth_signature", CreateSignature(consumerSecret, tokenSecret, httpMethod, requestUri, parameter));
// HTTPリクエストのヘッダに追加
if (this.IsDisposed) return;
if (vPos != -1)
+ {
if (vPos != NativeMethods.GetScrollPosition(this, NativeMethods.ScrollBarDirection.SB_VERT))
this.VScrolled?.Invoke(this, EventArgs.Empty);
+ }
+
if (hPos != -1)
+ {
if (hPos != NativeMethods.GetScrollPosition(this, NativeMethods.ScrollBarDirection.SB_HORZ))
this.HScrolled?.Invoke(this, EventArgs.Empty);
+ }
}
}
}
this.EditCheckBox.Checked = false;
for (var i = this.ListsList.Items.Count - 1; i >= 0; i--)
+ {
if (this.ListsList.Items[i] is NewListElement)
this.ListsList.Items.RemoveAt(i);
+ }
this.ListsList_SelectedIndexChanged(this.ListsList, EventArgs.Empty);
}
// TLに反映
if (SettingManager.Common.PostAndGet)
+ {
await this.RefreshTabAsync<HomeTabModel>();
+ }
else
{
if (post != null)
posts.ForEach(post => this.statuses.AddPost(post));
if (SettingManager.Common.PostAndGet)
+ {
await this.RefreshTabAsync<HomeTabModel>();
+ }
else
{
this.statuses.DistributePosts();
if (post.UserId == this.tw.UserId)
{
if (post.RetweetedId != null)
+ {
// 他人に RT された自分のツイート
// => RT 元の自分のツイートを削除
await this.twitterApi.StatusesDestroy(post.RetweetedId.Value)
.IgnoreResponse();
+ }
else
+ {
// 自分のツイート
// => ツイートを削除
await this.twitterApi.StatusesDestroy(post.StatusId)
.IgnoreResponse();
+ }
}
}
}
var endIndex = entity.Indices[1];
for (var i = curIndex; i < (startIndex + indexOffset); i++)
+ {
if (i + 1 < text.Length && char.IsSurrogatePair(text[i], text[i + 1]))
indexOffset++;
+ }
startIndex += indexOffset;
curIndex = startIndex;
for (var i = curIndex; i < (endIndex + indexOffset); i++)
+ {
if (i + 1 < text.Length && char.IsSurrogatePair(text[i], text[i + 1]))
indexOffset++;
+ }
endIndex += indexOffset;
curIndex = endIndex;
media.Add(new MediaInfo(ent.MediaUrlHttps, ent.AltText, ent.ExpandedUrl));
}
else
+ {
media.Add(new MediaInfo(ent.MediaUrlHttps, ent.AltText, videoUrl: null));
+ }
}
}
}