Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] Fix problem with account selector
@ 2013-04-15 14:01 Mark Alexander
  2013-04-17 10:22 ` Mark Alexander
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Alexander @ 2013-04-15 14:01 UTC (permalink / raw)
  To: sup-talk

Here is the commit on my fork (I also did a pull request)
for something that I found useful when using the same
inbox for both personal and work email:

https://github.com/bloovis/sup/commit/4f843f53feac2cc7e1f7d8f5a32043878b398ace

When sending a message, the account selector was ignoring
the account set by the before-edit hook.  Fix this
by running the hook before setting up the account selector.
---
 lib/sup/modes/edit-message-mode.rb |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
index 464d935..1ed5969 100644
--- a/lib/sup/modes/edit-message-mode.rb
+++ b/lib/sup/modes/edit-message-mode.rb
@@ -116,6 +116,8 @@ EOS
     @selector_label_width = 0
     @async_mode = nil
 
+    HookManager.run "before-edit", :header => @header, :body => @body
+
     @account_selector = nil
     # only show account selector if there is more than one email address
     if $config[:account_selector] && AccountManager.user_emails.length > 1
@@ -145,7 +147,6 @@ EOS
       end
     add_selector @crypto_selector if @crypto_selector
 
-    HookManager.run "before-edit", :header => @header, :body => @body
     if @crypto_selector
       HookManager.run "crypto-mode", :header => @header, :body => @body, :crypto_selector => @crypto_selector
     end
-- 
1.7.9.5
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-17 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-15 14:01 [sup-talk] [PATCH] Fix problem with account selector Mark Alexander
2013-04-17 10:22 ` Mark Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox