Avoid calling clearTimeout with an invalid id in the buddy list (for compatibility with the jsProtoHelper module if an add-on ever wants to include it there).
This commit is contained in:
Родитель
46c9efccda
Коммит
b4c2d5e2fc
|
@ -448,7 +448,8 @@ var buddyList = {
|
||||||
|
|
||||||
statusMessageRefreshTimer: function bl_statusMessageRefreshTimer() {
|
statusMessageRefreshTimer: function bl_statusMessageRefreshTimer() {
|
||||||
const timeBeforeAutoValidate = 20 * 1000;
|
const timeBeforeAutoValidate = 20 * 1000;
|
||||||
clearTimeout(this._stopEditStatusTimeout);
|
if ("_stopEditStatusTimeout" in this)
|
||||||
|
clearTimeout(this._stopEditStatusTimeout);
|
||||||
this._stopEditStatusTimeout = setTimeout(this.finishEditStatusMessage,
|
this._stopEditStatusTimeout = setTimeout(this.finishEditStatusMessage,
|
||||||
timeBeforeAutoValidate, true);
|
timeBeforeAutoValidate, true);
|
||||||
},
|
},
|
||||||
|
@ -476,6 +477,7 @@ var buddyList = {
|
||||||
|
|
||||||
finishEditStatusMessage: function bl_finishEditStatusMessage(aSave) {
|
finishEditStatusMessage: function bl_finishEditStatusMessage(aSave) {
|
||||||
clearTimeout(this._stopEditStatusTimeout);
|
clearTimeout(this._stopEditStatusTimeout);
|
||||||
|
delete this._stopEditStatusTimeout;
|
||||||
let elt = document.getElementById("statusMessage");
|
let elt = document.getElementById("statusMessage");
|
||||||
if (aSave) {
|
if (aSave) {
|
||||||
let newStatus = Ci.imIStatusInfo.STATUS_UNKNOWN;
|
let newStatus = Ci.imIStatusInfo.STATUS_UNKNOWN;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче