lib/ayadn/view.rb in ayadn-1.7.6 vs lib/ayadn/view.rb in ayadn-1.7.7

- old
+ new

@@ -41,10 +41,11 @@ puts build_stream_without_index(post, options, {}) end def show_posted(resp) show_simple_post([resp['data']], {}) + puts "\n" if Settings.options[:timeline][:compact] end def show_list_reposted(list, target) users_list, table = @workers.build_reposted_list(list, target) puts @workers.build_users_list(users_list, table) @@ -323,22 +324,31 @@ end def all_hashtag_links(stream, hashtag) clear_screen() puts "Links from posts containing hashtag '##{hashtag}': \n".color(:cyan) - show_links(@workers.links_from_posts(stream)) + links = @workers.links_from_posts(stream) + links.uniq! + show_links(links) + @workers.save_links(links, "hashtag", hashtag) end def all_search_links(stream, words) clear_screen() puts "Links from posts containing word(s) '#{words}': \n".color(:cyan) - show_links(@workers.links_from_posts(stream)) + links = @workers.links_from_posts(stream) + links.uniq! + show_links(links) + @workers.save_links(links, "search", words) end def all_stars_links(stream) clear_screen() puts "Links from your starred posts: \n".color(:cyan) - show_links(@workers.links_from_posts(stream)) + links = @workers.links_from_posts(stream) + links.uniq! + show_links(links) + @workers.save_links(links, 'starred') end def infos(stream, token) clear_screen() show_userinfos(stream, token, true)