Permalink
Browse files

trying what appears to be an old method

  • Loading branch information...
1 parent 840af4a commit 43a37f684a2cd11d38c1ba382997d47f0795f296 Chris Duesing committed Feb 20, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/gmail/gmail_base.rb
@@ -91,17 +91,12 @@ def disconnect
end
def in_mailbox(mailbox, &block)
- imap.add_response_handler do |resp|
- if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS"
- puts "Mailbox now has #{resp.data} messages"
- @message_count = resp.data
- end
- end
if block_given?
mailbox_stack << mailbox
unless @selected == mailbox.name
imap.select(mailbox.name)
@selected = mailbox.name
+ @message_count = imap.responses['UIDNEXT'][-1]
end
value = block.arity == 1 ? block.call(mailbox) : block.call
mailbox_stack.pop

0 comments on commit 43a37f6

Please sign in to comment.