flumtter 5.4.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/flumtter/app/core/command/tweet.rb +8 -0
- data/lib/flumtter/app/core/util.rb +4 -0
- data/lib/flumtter/app/core/windows/buf_window.rb +2 -0
- data/lib/flumtter/app/core/windows/conversation.rb +28 -0
- data/lib/flumtter/app/core/windows/dmbase.rb +1 -1
- data/lib/flumtter/app/core/windows/tweetbase.rb +1 -1
- data/lib/flumtter/app/plugins/commands/conversation.rb +1 -26
- data/lib/flumtter/app/plugins/timeline/base.rb +3 -1
- data/lib/flumtter/app/plugins/timeline/fav.rb +1 -1
- data/lib/flumtter/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13d1dedbe6e2272bfc5a0703d9ca4ac97891205f
|
4
|
+
data.tar.gz: f2a259bf554cf3b41526b280b8ecf106246b492a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2607cae78919444f5fcd1844a0cf1c0c78257ee6e97b5ad9875c0161a6452ba518e2f0022616b199213cd4022197dbd60cfc7632a8b5bb50e5a78cc715a792b
|
7
|
+
data.tar.gz: ee9ea90fe2b6bb37dc88a44706ead7549680d686268e9068e284416ec5139183eb6ad9b1dd7c803e6556ca56aaf256b18dafb195f3fb844db46925b0293cc10e
|
@@ -19,6 +19,14 @@ module Flumtter
|
|
19
19
|
Plugins::Reply.update(obj, m2, twitter)
|
20
20
|
end
|
21
21
|
end
|
22
|
+
command("g", "Conversation") do |m|
|
23
|
+
error_handler do
|
24
|
+
obj, _ = parse_index(m[1])
|
25
|
+
if_tweet(obj, twitter) do |tweet|
|
26
|
+
Window::Conversation.new(tweet, twitter).show
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
22
30
|
end
|
23
31
|
end
|
24
32
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Flumtter
|
2
|
+
module Window
|
3
|
+
class ConversationBuf < Buf::Buf
|
4
|
+
def initialize(twitter)
|
5
|
+
@twitter = twitter
|
6
|
+
super(Window::TweetBase)
|
7
|
+
end
|
8
|
+
|
9
|
+
def prefetch
|
10
|
+
id = @buf.last&.object&.in_reply_to_status_id
|
11
|
+
add(
|
12
|
+
@twitter.rest.status(id)
|
13
|
+
) unless id.nil?
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class Conversation < Window::Buf::Screen
|
18
|
+
include Command::Tweet
|
19
|
+
|
20
|
+
def initialize(obj, twitter)
|
21
|
+
buf = ConversationBuf.new(twitter)
|
22
|
+
buf.add(obj)
|
23
|
+
super(buf, "Conversation")
|
24
|
+
add_command(twitter)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -1,37 +1,12 @@
|
|
1
1
|
module Flumtter
|
2
2
|
plugin do
|
3
|
-
class self::Buf < Window::Buf::Buf
|
4
|
-
def initialize(twitter)
|
5
|
-
@twitter = twitter
|
6
|
-
super(Window::TweetBase)
|
7
|
-
end
|
8
|
-
|
9
|
-
def prefetch
|
10
|
-
id = @buf.last&.object&.in_reply_to_status_id
|
11
|
-
add(
|
12
|
-
@twitter.rest.status(id)
|
13
|
-
) unless id.nil?
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
class self::Conversation < Window::Buf::Screen
|
18
|
-
include Command::Tweet
|
19
|
-
|
20
|
-
def initialize(obj, twitter)
|
21
|
-
buf = Plugins::Conversation::Buf.new(twitter)
|
22
|
-
buf.add(obj)
|
23
|
-
super(buf, "Conversation")
|
24
|
-
add_command(twitter)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
3
|
Keyboard.add("g", "Conversation") do |m, twitter|
|
29
4
|
error_handler do
|
30
5
|
obj, _ = index_with_dialog(m[1], "Conversation Screen", <<~EOF)
|
31
6
|
Please input target index.
|
32
7
|
EOF
|
33
8
|
if_tweet(obj, twitter) do |tweet|
|
34
|
-
|
9
|
+
Window::Conversation.new(tweet, twitter).show
|
35
10
|
end
|
36
11
|
end
|
37
12
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Flumtter
|
2
2
|
module TimeLine
|
3
3
|
class Base
|
4
|
+
include Util
|
5
|
+
|
4
6
|
@@elements = []
|
5
7
|
|
6
8
|
def self.[](key)
|
@@ -51,7 +53,7 @@ module Flumtter
|
|
51
53
|
end
|
52
54
|
|
53
55
|
def created_at
|
54
|
-
@object.created_at
|
56
|
+
parse_time(@object.created_at)
|
55
57
|
end
|
56
58
|
|
57
59
|
def index
|
data/lib/flumtter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flumtter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- flum1025
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- lib/flumtter/app/core/util.rb
|
153
153
|
- lib/flumtter/app/core/windows/base.rb
|
154
154
|
- lib/flumtter/app/core/windows/buf_window.rb
|
155
|
+
- lib/flumtter/app/core/windows/conversation.rb
|
155
156
|
- lib/flumtter/app/core/windows/dialog.rb
|
156
157
|
- lib/flumtter/app/core/windows/dmbase.rb
|
157
158
|
- lib/flumtter/app/core/windows/dynamic_view.rb
|