Browse Source

Fix undefined newKey in the delete listener (was never a member variable).

1.1.101
Jorg Knobloch 2 years ago
parent
commit
30591f02a3
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      addon/content/TbHelper.js

+ 3
- 4
addon/content/TbHelper.js View File

@ -63,7 +63,6 @@ const TbHelper = {
// The deletion happens in `OnStopCopy()` of the copy listener for local messages
// and in `OnStopRunningUrl()` for IMAP messages if the folder is displayed since
// otherwise `OnStopRunningUrl()` doesn't run.
let copyListener;
const deleteListener = {
QueryInterface(iid) {
if (iid.equals(Ci.nsIMsgCopyServiceListener) || iid.equals(Ci.nsISupports)) {
@ -75,8 +74,8 @@ const TbHelper = {
OnStopCopy() {
if (selectNew && win && win.gDBView) {
// Display the new message.
controller.log.info(`Selecting new message with key ${copyListener.newKey}`);
win.gDBView.selectMsgByKey(copyListener.newKey);
controller.log.info(`Selecting new message with key ${newKey}`);
win.gDBView.selectMsgByKey(newKey);
}
},
};
@ -85,7 +84,7 @@ const TbHelper = {
let statusCode = 0;
let deletedOld = false;
copyListener = {
const copyListener = {
QueryInterface(iid) {
if (iid.equals(Ci.nsIMsgCopyServiceListener) ||
iid.equals(Ci.nsIUrlListener) ||


Loading…
Cancel
Save