diff options
author | anekos | 2011-10-30 01:43:27 +0900 |
---|---|---|
committer | anekos | 2011-10-30 01:44:07 +0900 |
commit | 61d0d4b5fcfaaf46e64cc6756dabc16fe1a3158c (patch) | |
tree | e0b1282f7919b84b03e9470e711df2845b11b138 | |
parent | 2588ec5e1a2da314d70691d933c12c5e31f64222 (diff) | |
download | vimperator-plugins-61d0d4b5fcfaaf46e64cc6756dabc16fe1a3158c.tar.bz2 |
エラーになったときは、とりあえずそこまでのを表示する
-rw-r--r-- | twittperator.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/twittperator.js b/twittperator.js index 7407705..40bf585 100644 --- a/twittperator.js +++ b/twittperator.js @@ -28,7 +28,7 @@ let PLUGIN_INFO = <name>Twittperator</name> <description>Twitter Client using OAuth and Streaming API</description> <description lang="ja">OAuth/StreamingAPI対応Twitterクライアント</description> - <version>1.16.1</version> + <version>1.16.2</version> <minVersion>2.3</minVersion> <author email="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author> <author email="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> @@ -2214,18 +2214,23 @@ let PLUGIN_INFO = command: ["thread"], description: "Show tweets thread.", action: function(arg) { + function showThread () { + Twittperator.showTL(thread); + } function getStatus(id, next) { let result; - if (history.some(function (it) (it.id == id && (result = it)))) + if (history.some(function (it) (it.id == id && (result = it)))) { return next(result); - tw.jsonGet("statuses/show/" + id, null, function(res) next(res)) + } + // XXX エラーの時はなにか表示しておくべき? + tw.jsonGet("statuses/show/" + id, null, function(res) next(res), showThread); } function trace(st) { thread.push(st); if (st.in_reply_to_status_id) { getStatus(st.in_reply_to_status_id, trace); } else { - Twittperator.showTL(thread); + showThread(); } } |