Skip to content

Commit

Permalink
Web GUI: Unregister click events before btn re-use
Browse files Browse the repository at this point in the history
Fixes a bug where subsequent "Move to archive" actions resulted in
attempting to redo the previous move.
  • Loading branch information
martinhpedersen committed Jul 18, 2017
1 parent 349e947 commit a6f4af4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion res/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ function displayMessage(elem) {
);
}
}

$('#reply_btn').off('click');
$('#reply_btn').click(function(evt){
$('#message_view').modal('hide');

Expand All @@ -504,6 +504,7 @@ function displayMessage(elem) {

$('#composer').modal('show');
});
$('#forward_btn').off('click');
$('#forward_btn').click(function(evt){
$('#message_view').modal('hide');

Expand All @@ -512,9 +513,11 @@ function displayMessage(elem) {

$('#composer').modal('show');
});
$('#delete_btn').off('click');
$('#delete_btn').click(function(evt){
deleteMessage(currentFolder, mid);
});
$('#archive_btn').off('click');
$('#archive_btn').click(function(evt){
archiveMessage(currentFolder, mid);
});
Expand Down

0 comments on commit a6f4af4

Please sign in to comment.