Class: Twterm::Tab::Statuses::ListTimeline
- Inherits:
-
AbstractStatusesTab
- Object
- AbstractTab
- AbstractStatusesTab
- Twterm::Tab::Statuses::ListTimeline
- Includes:
- Dumpable
- Defined in:
- lib/twterm/tab/statuses/list_timeline.rb
Instance Attribute Summary collapse
-
#list_id ⇒ Object
readonly
Returns the value of attribute list_id.
Attributes inherited from AbstractTab
Instance Method Summary collapse
- #==(other) ⇒ Object
- #close ⇒ Object
- #dump ⇒ Object
- #fetch ⇒ Object
-
#initialize(app, client, list_id) ⇒ ListTimeline
constructor
A new instance of ListTimeline.
Methods included from Dumpable
Methods inherited from AbstractStatusesTab
#append, #delete, #destroy_status, #drawable_item_count, #favorite, #items, #matches?, #open_link, #prepend, #quote, #reply, #respond_to_key, #retweet, #show_conversation, #show_user, #statuses, #total_item_count
Methods included from Utils
Methods included from Loadable
#initially_loaded!, #initially_loaded?
Methods included from Subscriber
included, #subscribe, #unsubscribe
Methods included from Twterm::Tab::Searchable
Methods included from Twterm::Tab::Scrollable
Methods included from Publisher
Methods inherited from AbstractTab
#find_or_fetch_list, #find_or_fetch_status, #find_or_fetch_user, #render, #respond_to_key
Constructor Details
#initialize(app, client, list_id) ⇒ ListTimeline
Returns a new instance of ListTimeline.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/twterm/tab/statuses/list_timeline.rb', line 11 def initialize(app, client, list_id) super(app, client) @list_id = list_id self.title = 'Loading...'.freeze @auto_reloader = Scheduler.new(300) { reload } find_or_fetch_list(list_id).then do |list| self.title = list.full_name app.tab_manager.refresh_window reload.then do initially_loaded! scroller.move_to_top end end end |
Instance Attribute Details
#list_id ⇒ Object (readonly)
Returns the value of attribute list_id.
9 10 11 |
# File 'lib/twterm/tab/statuses/list_timeline.rb', line 9 def list_id @list_id end |
Instance Method Details
#==(other) ⇒ Object
40 41 42 |
# File 'lib/twterm/tab/statuses/list_timeline.rb', line 40 def ==(other) other.is_a?(self.class) && list_id == other.list_id end |
#close ⇒ Object
35 36 37 38 |
# File 'lib/twterm/tab/statuses/list_timeline.rb', line 35 def close @auto_reloader.kill if @auto_reloader super end |
#dump ⇒ Object
44 45 46 |
# File 'lib/twterm/tab/statuses/list_timeline.rb', line 44 def dump list_id end |
#fetch ⇒ Object
31 32 33 |
# File 'lib/twterm/tab/statuses/list_timeline.rb', line 31 def fetch client.list_timeline(list_id) end |