vnews 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vnews/sql.rb +3 -5
- data/lib/vnews/version.rb +1 -1
- data/lib/vnews.vim +1 -1
- metadata +2 -2
data/lib/vnews/sql.rb
CHANGED
@@ -75,12 +75,11 @@ class Vnews
|
|
75
75
|
# queries:
|
76
76
|
|
77
77
|
def folders
|
78
|
-
all = @client.query("SELECT 'All' as folder, count(*) as count from items
|
79
|
-
starred = @client.query("SELECT 'Starred' as folder, count(*) as count from items
|
80
|
-
where items.starred = true").first
|
78
|
+
all = @client.query("SELECT 'All' as folder, count(*) as count from items").first
|
79
|
+
starred = @client.query("SELECT 'Starred' as folder, count(*) as count from items where items.starred = true").first
|
81
80
|
folders = @client.query("SELECT folder, count(*) as count from feeds_folders
|
82
81
|
inner join items i on i.feed = feeds_folders.feed
|
83
|
-
|
82
|
+
group by folder order by folder")
|
84
83
|
folders = [all, starred] + folders.to_a
|
85
84
|
folders
|
86
85
|
end
|
@@ -99,7 +98,6 @@ class Vnews
|
|
99
98
|
# "feeds.title asc"
|
100
99
|
@client.query("SELECT feeds.*, count(i.unread) as item_count from feeds
|
101
100
|
left outer join items i on i.feed = feeds.feed_url
|
102
|
-
where i.unread = true
|
103
101
|
group by feeds.feed_url
|
104
102
|
order by feeds.title asc")
|
105
103
|
else
|
data/lib/vnews/version.rb
CHANGED
data/lib/vnews.vim
CHANGED
@@ -188,7 +188,7 @@ func! s:list_feeds(popular_first)
|
|
188
188
|
" default is alphabetical
|
189
189
|
" 1 means order by popular_first
|
190
190
|
let res = system(s:list_feeds_command . " " . a:popular_first)
|
191
|
-
let promptsuffix = a:popular_first ? "(num of item views)" : "(num of
|
191
|
+
let promptsuffix = a:popular_first ? "(num of item views)" : "(num of items)"
|
192
192
|
let feeds = split(res, "\n")
|
193
193
|
if len(feeds) == 0
|
194
194
|
echom "There are no feeds."
|