• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

開発に使用するリポジトリ


Commit MetaInfo

Revisionbd8a24da1e0e07fd20331e6c80960f6a4b6a065f (tree)
Time2013-07-06 02:54:36
AuthorKimura Youichi <kim.upsilon@bucy...>
CommiterKimura Youichi

Log Message

API v1 廃止によってGetRelatedResultsApi実行時にエラーが表示される問題を修正 (thx @KishSoup!)

関連発言表示の機能そのものは related_results.json が使用できない場合であっても
リプライチェインを辿る挙動にフォールバックするため動作に支障はない。

Change Summary

Incremental Difference

--- a/OpenTween/Resources/ChangeLog.txt
+++ b/OpenTween/Resources/ChangeLog.txt
@@ -8,6 +8,7 @@
88 * FIX: 検索タブ更新時に壊れたツイートを受信した場合の対策を追加 (thx @nyamph_pf!)
99 * FIX: 検索機能の API v1.1 対応が不完全であった箇所の修正 (thx @nyamph_pf!)
1010 * FIX: APIレートリミット表示がタイミングによって不整合を起こす問題の修正
11+ * FIX: 関連発言表示時に Err:Gone(GetRelatedResultsApi) が表示される問題の修正 (thx @KishSoup!)
1112
1213 ==== Ver 1.1.1(2013/06/11)
1314 * 当バージョンから Twitter API v1.1 に対応しています
--- a/OpenTween/Twitter.cs
+++ b/OpenTween/Twitter.cs
@@ -2577,15 +2577,21 @@ namespace OpenTween
25772577 }
25782578 relPosts.Add(tab.RelationTargetPost.StatusId, tab.RelationTargetPost.Clone());
25792579
2580+ PostClass nextPost;
2581+ int loopCount;
2582+
25802583 // 一周目: 非公式な related_results API を使用してリプライチェインを辿る
2581- var nextPost = relPosts[tab.RelationTargetPost.StatusId];
2582- var loopCount = 1;
2583- do
2584+ if (!HttpTwitter.API11Enabled)
25842585 {
2585- rslt = this.GetRelatedResultsApi(nextPost, relPosts);
2586- if (!string.IsNullOrEmpty(rslt)) break;
2587- nextPost = FindTopOfReplyChain(relPosts, nextPost.StatusId);
2588- } while (nextPost.InReplyToStatusId != 0 && loopCount++ <= 5);
2586+ nextPost = relPosts[tab.RelationTargetPost.StatusId];
2587+ loopCount = 1;
2588+ do
2589+ {
2590+ rslt = this.GetRelatedResultsApi(nextPost, relPosts);
2591+ if (!string.IsNullOrEmpty(rslt)) break;
2592+ nextPost = FindTopOfReplyChain(relPosts, nextPost.StatusId);
2593+ } while (nextPost.InReplyToStatusId != 0 && loopCount++ <= 5);
2594+ }
25892595
25902596 // 二周目: in_reply_to_status_id を使用してリプライチェインを辿る
25912597 nextPost = FindTopOfReplyChain(relPosts, tab.RelationTargetPost.StatusId);