rutt 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/rutt/screen/item.rb +7 -0
- data/rutt.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/lib/rutt/screen/item.rb
CHANGED
@@ -7,6 +7,10 @@ module Rutt
|
|
7
7
|
@feed = feed
|
8
8
|
@menu = " i:quit r:refresh m:mark as read u:mark as unread a:mark all as read b:open in browser"
|
9
9
|
|
10
|
+
get_items
|
11
|
+
end
|
12
|
+
|
13
|
+
def get_items
|
10
14
|
@items = DB::Item::all(@feed)
|
11
15
|
@pages = @items / @max_y
|
12
16
|
end
|
@@ -75,11 +79,13 @@ module Rutt
|
|
75
79
|
when /m/i
|
76
80
|
cur_y = @cur_y - 1
|
77
81
|
DB::Item::mark_as_read(@items[cur_y])
|
82
|
+
get_items
|
78
83
|
window
|
79
84
|
move_pointer(cur_y + 1, move_to=true)
|
80
85
|
when /u/i
|
81
86
|
cur_y = @cur_y - 1
|
82
87
|
DB::Item::mark_as_unread(@items[cur_y])
|
88
|
+
get_items
|
83
89
|
window
|
84
90
|
move_pointer(cur_y + 1, move_to=true)
|
85
91
|
when /r/i
|
@@ -89,6 +95,7 @@ module Rutt
|
|
89
95
|
content_screen = Content.new(@stdscr, @items[@cur_y - 1])
|
90
96
|
content_screen.loop
|
91
97
|
|
98
|
+
get_items
|
92
99
|
window
|
93
100
|
move_pointer(@cur_y, move_to=true)
|
94
101
|
end
|
data/rutt.gemspec
CHANGED
metadata
CHANGED