Skip to content

Commit

Permalink
Fix problem with account selector
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bloovis authored and gauteh committed Apr 20, 2013
1 parent 67aedbe commit 66e183c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/sup/modes/edit-message-mode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def initialize opts={}
@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
Expand Down Expand Up @@ -145,7 +147,6 @@ def initialize opts={}
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
Expand Down

0 comments on commit 66e183c

Please sign in to comment.