開発に使用するリポジトリ
Revision | bd8a24da1e0e07fd20331e6c80960f6a4b6a065f (tree) |
---|---|
Time | 2013-07-06 02:54:36 |
Author | Kimura Youichi <kim.upsilon@bucy...> |
Commiter | Kimura Youichi |
API v1 廃止によってGetRelatedResultsApi実行時にエラーが表示される問題を修正 (thx @KishSoup!)
関連発言表示の機能そのものは related_results.json が使用できない場合であっても
リプライチェインを辿る挙動にフォールバックするため動作に支障はない。
@@ -8,6 +8,7 @@ | ||
8 | 8 | * FIX: 検索タブ更新時に壊れたツイートを受信した場合の対策を追加 (thx @nyamph_pf!) |
9 | 9 | * FIX: 検索機能の API v1.1 対応が不完全であった箇所の修正 (thx @nyamph_pf!) |
10 | 10 | * FIX: APIレートリミット表示がタイミングによって不整合を起こす問題の修正 |
11 | + * FIX: 関連発言表示時に Err:Gone(GetRelatedResultsApi) が表示される問題の修正 (thx @KishSoup!) | |
11 | 12 | |
12 | 13 | ==== Ver 1.1.1(2013/06/11) |
13 | 14 | * 当バージョンから Twitter API v1.1 に対応しています |
@@ -2577,15 +2577,21 @@ namespace OpenTween | ||
2577 | 2577 | } |
2578 | 2578 | relPosts.Add(tab.RelationTargetPost.StatusId, tab.RelationTargetPost.Clone()); |
2579 | 2579 | |
2580 | + PostClass nextPost; | |
2581 | + int loopCount; | |
2582 | + | |
2580 | 2583 | // 一周目: 非公式な related_results API を使用してリプライチェインを辿る |
2581 | - var nextPost = relPosts[tab.RelationTargetPost.StatusId]; | |
2582 | - var loopCount = 1; | |
2583 | - do | |
2584 | + if (!HttpTwitter.API11Enabled) | |
2584 | 2585 | { |
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 | + } | |
2589 | 2595 | |
2590 | 2596 | // 二周目: in_reply_to_status_id を使用してリプライチェインを辿る |
2591 | 2597 | nextPost = FindTopOfReplyChain(relPosts, tab.RelationTargetPost.StatusId); |