Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting an email does not remove the inbox label #211

Closed
cscorley opened this issue Jan 16, 2014 · 4 comments
Closed

Deleting an email does not remove the inbox label #211

cscorley opened this issue Jan 16, 2014 · 4 comments

Comments

@cscorley
Copy link
Contributor

Hi,

I'm not sure if this is a bug or a feature, but sup does not remove the "inbox" label when deleting an email. I understand that archiving achieves this, but should deletion not also? I am having trouble with emails showing back up in the inbox after deleting them.

@gauteh
Copy link
Member

gauteh commented Jan 17, 2014

It is supposed to retain all the other labels when deleting, but you should
be able to achieve what you describe using hooks.

Gaute
16. jan. 2014 23:31 skrev "Christopher Corley" [email protected]
følgende:

Hi,

I'm not sure if this is a bug or a feature, but sup does not remove the
"inbox" label when deleting an email. I understand that archiving achieves
this, but should deletion not also?


Reply to this email directly or view it on GitHubhttps://github.com//issues/211
.

@cscorley
Copy link
Contributor Author

I'm not entirely sure which of the hooks this would fit in, but I'll see if I can figure it out. Thanks.

@gauteh
Copy link
Member

gauteh commented Jan 18, 2014

Ok, let us know how it works out. Others could probably be interested
aswell.
18. jan. 2014 07:36 skrev "Christopher Corley" [email protected]
følgende:

I'm not entirely sure which of the hooks this would fit in, but I'll see
if I can figure it out. Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//issues/211#issuecomment-32675968
.

@cscorley
Copy link
Contributor Author

Got it! Had to add a method to a few of the modes, and then bind a key to that method.

startup.rb:

class Redwood::ThreadIndexMode
  def toggle_archived_and_deleted
    t = cursor_thread or return
    multi_toggle_archived [t]
    multi_toggle_deleted [t]
  end
end

class Redwood::InboxMode
  def archive_and_delete
    t = cursor_thread or return
    multi_archive [t]
    multi_toggle_deleted [t]
  end
end

and keybindings.rb:

modes["inbox-mode"].keymap.add :archive_and_delete, "Archive and delete", :backspace
modes["thread-index-mode"].keymap.add :toggle_archived_and_deleted, "Archive and delete thread", :backspace

Hope this helps someone out! Could probably just override the original archive/delete methods to do the same, but I wanted to keep the difference clear for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants