twterm 2.0.0.beta3 → 2.0.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5437110c78f1fd007bdd6ce02f1c88f2d699e320
4
- data.tar.gz: fc02658604bfb54ccb45edc61ac69e3c33e67dac
3
+ metadata.gz: '00415181902d737f2283de4a54152889cffc54ab'
4
+ data.tar.gz: '009bd013a8832bc161b1e3613b6a00bea98df2a7'
5
5
  SHA512:
6
- metadata.gz: 70b852078a4f295a4c27d15ec86b67c330cbe67f5f803e243240e21dde99a5635dbb3aa1da1ad339ec3a50b1e7f778e9b8a845702daf90adee29f2fd4442fd69
7
- data.tar.gz: 9dc10d8f391208aa9f40a31407fc5721ead7a6aaa7997a1371888a2bd093e43b12b3ef70b82847b99a4d155bd706d1ef5532af0683f45948f082b047c441860b
6
+ metadata.gz: '066976acf5219459f6c018153d97745c7138a98a1928061f780cc29520943e30afd5e2505a9d2f39eb018be6e1287e4b84b70ff5a6b39534b64bcc2ccc50b6fa'
7
+ data.tar.gz: 956676d43c5ee57370ad7ed17520b83789bb71b1bf2e96d20700d5604be7879d833d52004936a8b31b6612717aa970e460a74185be239d3c1aee36f11328babf
data/lib/twterm/image.rb CHANGED
@@ -45,7 +45,7 @@ class Twterm::Image
45
45
  end
46
46
 
47
47
  def self.checkbox(checked)
48
- string(checked ? 'x' : ' ').brackets
48
+ string(checked ? '*' : ' ').brackets
49
49
  end
50
50
 
51
51
  def color(fg, bg = :transparent)
@@ -30,9 +30,9 @@ module Twterm
30
30
  rest_client.create_direct_message(recipient.id, text)
31
31
  end.then do |message|
32
32
  msg = direct_message_repository.create(message)
33
- direct_message_manager.add(msg.recipient, msg)
33
+ direct_message_manager.add(recipient.id, msg)
34
34
  publish(Event::DirectMessage::Fetched.new)
35
- publish(Event::Notification::Success.new('Your message to @%s has been sent' % msg.recipient.screen_name))
35
+ publish(Event::Notification::Success.new('Your message to @%s has been sent' % recipient.screen_name))
36
36
  end
37
37
  end
38
38
 
@@ -161,11 +161,9 @@ module Twterm
161
161
  end
162
162
  end
163
163
 
164
- def list_timeline(list)
165
- fail ArgumentError,
166
- 'argument must be an instance of List class' unless list.is_a? List
164
+ def list_timeline(list_id)
167
165
  send_request do
168
- rest_client.list_timeline(list.id, count: 200)
166
+ rest_client.list_timeline(list_id, count: 200)
169
167
  end.then do |statuses|
170
168
  statuses
171
169
  .select(&@mute_filter)
@@ -6,16 +6,17 @@ module Twterm
6
6
  class ListTimeline < Base
7
7
  include Dumpable
8
8
 
9
- attr_reader :list
9
+ attr_reader :list_id
10
10
 
11
11
  def initialize(app, client, list_id)
12
12
  super(app, client)
13
13
 
14
+ @list_id = list_id
15
+
14
16
  self.title = 'Loading...'.freeze
15
17
 
16
18
  find_or_fetch_list(list_id).then do |list|
17
- @list = list
18
- self.title = @list.full_name
19
+ self.title = list.full_name
19
20
  app.tab_manager.refresh_window
20
21
 
21
22
  reload.then do
@@ -28,7 +29,7 @@ module Twterm
28
29
  end
29
30
 
30
31
  def fetch
31
- client.list_timeline(@list)
32
+ client.list_timeline(list_id)
32
33
  end
33
34
 
34
35
  def close
@@ -37,11 +38,11 @@ module Twterm
37
38
  end
38
39
 
39
40
  def ==(other)
40
- other.is_a?(self.class) && list == other.list
41
+ other.is_a?(self.class) && list_id == other.list_id
41
42
  end
42
43
 
43
44
  def dump
44
- @list.id
45
+ list_id
45
46
  end
46
47
  end
47
48
  end
@@ -1,3 +1,3 @@
1
1
  module Twterm
2
- VERSION = '2.0.0.beta3'
2
+ VERSION = '2.0.0.beta4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twterm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta3
4
+ version: 2.0.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Kameoka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses