lib/ayadn/stream.rb in ayadn-1.7.6 vs lib/ayadn/stream.rb in ayadn-1.7.7
- old
+ new
@@ -23,10 +23,11 @@
end
if Settings.options[:timeline][:compact] == true && options[:scroll] == true
@view.clear_screen()
end
Scroll.new(@api, @view).global(options) if options[:scroll]
+ puts "\n" if Settings.options[:timeline][:compact] && options[:raw].nil?
end
def method_missing(meth, options)
case meth
@@ -52,10 +53,11 @@
end
if Settings.options[:timeline][:compact] == true && options[:scroll] == true
@view.clear_screen()
end
Scroll.new(@api, @view).send(meth, options) if options[:scroll]
+ puts "\n" if Settings.options[:timeline][:compact] && options[:raw].nil?
end
def mentions username, options
Settings.options[:force] = true if options[:force]
@@ -73,10 +75,11 @@
end
if Settings.options[:timeline][:compact] == true && options[:scroll] == true
@view.clear_screen()
end
Scroll.new(@api, @view).mentions(username, options) if options[:scroll]
+ puts "\n" if Settings.options[:timeline][:compact] && options[:raw].nil?
end
def posts username, options
Settings.options[:force] = true if options[:force]
Check.no_username(username)
@@ -89,10 +92,11 @@
if Databases.blacklist["-#{username.downcase}"] || stream['data'][0]['user']['you_muted'] || stream['data'][0]['user']['you_blocked']
abort(Status.no_force("#{username.downcase}")) unless options[:raw] || Settings.options[:force]
end
@view.render(stream, options)
Scroll.new(@api, @view).posts(username, options) if options[:scroll]
+ puts "\n" if Settings.options[:timeline][:compact] && options[:raw].nil?
end
def whatstarred(username, options)
Check.no_username(username)
username = @workers.add_arobase(username)
@@ -191,10 +195,11 @@
options = options.dup
options[:reply_to] = details['data']['reply_to'].to_i unless details['data']['reply_to'].nil?
options[:post_id] = post_id.to_i
@view.render(stream, options)
Scroll.new(@api, @view).convo(id, options) if options[:scroll]
+ puts "\n" if Settings.options[:timeline][:compact] && options[:raw].nil?
end
def messages(channel_id, options)
channel_id = @workers.get_channel_id_from_alias(channel_id)
@view.downloading(options)
@@ -203,9 +208,10 @@
Databases.save_max_id(resp)
@view.if_raw(resp, options)
Check.no_data(resp, 'messages')
@view.render(resp, options)
Scroll.new(@api, @view).messages(channel_id, options) if options[:scroll]
+ puts "\n" if Settings.options[:timeline][:compact] && options[:raw].nil?
end
def random_posts(options)
#_, cols = @view.winsize
#max_posts = cols / 16