vmail 2.3.7 → 2.3.8

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.
@@ -632,7 +632,7 @@ endfunc
632
632
  function! s:send_message()
633
633
  let mail = join(getline(1,'$'), "\n")
634
634
  echo "Sending message"
635
- let res = s:system_with_error_handling(s:deliver_command, mail)
635
+ let res = system(s:deliver_command, mail)
636
636
  if match(res, '^Failed') == -1
637
637
  write!
638
638
  call s:close_and_focus_list_window()
@@ -194,8 +194,7 @@ module Vmail
194
194
  self.max_seqno -= num
195
195
  end
196
196
 
197
- # TODO why not just reload the current page?
198
- def update
197
+ def check_for_new_messages
199
198
  if search_query?
200
199
  log "Update aborted because query is search query: #{@query.inspect}"
201
200
  return ""
@@ -215,10 +214,16 @@ module Vmail
215
214
  log "- got seqnos: #{ids.inspect}"
216
215
  log "- getting seqnos > #{self.max_seqno}"
217
216
  new_ids = ids.select {|seqno| seqno > self.max_seqno}
218
- @ids = @ids + new_ids
219
- log "- update: new uids: #{new_ids.inspect}"
217
+ log "- new uids found: #{new_ids.inspect}"
218
+ new_ids
219
+ end
220
+
221
+ # TODO why not just reload the current page?
222
+ def update
223
+ new_ids = check_for_new_messages
220
224
  if !new_ids.empty?
221
225
  self.max_seqno = new_ids[-1]
226
+ @ids = @ids + new_ids
222
227
  message_ids = fetch_and_cache_headers(new_ids)
223
228
  res = get_message_headers(message_ids)
224
229
  res
@@ -226,8 +231,7 @@ module Vmail
226
231
  ''
227
232
  end
228
233
  rescue
229
- log $!
230
- log $!.backtrace.join("\n")
234
+ puts "VMAIL_ERROR: #{[$!.message, $!.backtrace].join("\n")}"
231
235
  end
232
236
 
233
237
  # gets 100 messages prior to id
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '2.3.7'
2
+ VERSION = '2.3.8'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 3
8
- - 7
9
- version: 2.3.7
8
+ - 8
9
+ version: 2.3.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi