vmail 0.7.0 → 0.7.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/README.markdown +1 -1
- data/lib/vmail/imap_client.rb +10 -4
- data/lib/vmail/version.rb +1 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -158,7 +158,7 @@ spam, or archive. Use `v` to start marking a range of lines (the vertical
|
|
158
158
|
position of the cursor doesn't matter). Then type any of the above commands to
|
159
159
|
perform an action on all the messages you selected.
|
160
160
|
|
161
|
-
To save you
|
161
|
+
To save you keystrokes, vmail provides alternative key mappings for
|
162
162
|
`,*`, `,#`, and `,!`:
|
163
163
|
|
164
164
|
* star: `,*` → `,8`
|
data/lib/vmail/imap_client.rb
CHANGED
@@ -66,6 +66,12 @@ module Vmail
|
|
66
66
|
select_mailbox(@mailbox, true)
|
67
67
|
end
|
68
68
|
|
69
|
+
def clear_cached_message
|
70
|
+
@current_mail = nil
|
71
|
+
@current_message_index = nil
|
72
|
+
@current_message = nil
|
73
|
+
end
|
74
|
+
|
69
75
|
def get_highest_message_id
|
70
76
|
# get highest message ID
|
71
77
|
res = @imap.fetch([1,"*"], ["ENVELOPE"])
|
@@ -276,9 +282,7 @@ module Vmail
|
|
276
282
|
end
|
277
283
|
log "search query got #{@ids.size} results"
|
278
284
|
@message_list = [] # this will hold all the data extracted from these message envelopes
|
279
|
-
|
280
|
-
@current_message_index = nil
|
281
|
-
@current_message = nil
|
285
|
+
clear_cached_message
|
282
286
|
res = fetch_envelopes(fetch_ids)
|
283
287
|
add_more_message_line(res, fetch_ids[0])
|
284
288
|
end
|
@@ -405,8 +409,8 @@ EOF
|
|
405
409
|
log @imap.uid_store(uid_set, action, [flg.to_sym])
|
406
410
|
remove_uid_set_from_cached_lists(uid_set)
|
407
411
|
reload_mailbox
|
412
|
+
clear_cached_message
|
408
413
|
end
|
409
|
-
|
410
414
|
elsif flg == '[Gmail]/Spam'
|
411
415
|
log "Marking as spam index_range: #{index_range.inspect}; uid_set: #{uid_set.inspect}"
|
412
416
|
Thread.new do
|
@@ -416,6 +420,7 @@ EOF
|
|
416
420
|
log @imap.uid_store(uid_set, action, [:Deleted])
|
417
421
|
remove_uid_set_from_cached_lists(uid_set)
|
418
422
|
reload_mailbox
|
423
|
+
clear_cached_message
|
419
424
|
end
|
420
425
|
"#{id} deleted"
|
421
426
|
else
|
@@ -487,6 +492,7 @@ EOF
|
|
487
492
|
log @imap.uid_store(uid_set, '+FLAGS', [:Deleted])
|
488
493
|
remove_uid_set_from_cached_lists(uid_set)
|
489
494
|
reload_mailbox
|
495
|
+
clear_cached_message
|
490
496
|
log "moved uid_set #{uid_set.inspect} to #{mailbox}"
|
491
497
|
end
|
492
498
|
end
|
data/lib/vmail/version.rb
CHANGED