mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 10:05:49 +01:00
Some ensurance against :downloads cleanup handler not being called.
This commit is contained in:
@@ -248,7 +248,7 @@ var DownloadList = Class("DownloadList",
|
|||||||
else {
|
else {
|
||||||
this.addDownload(download.id);
|
this.addDownload(download.id);
|
||||||
|
|
||||||
this.modules.commandline.updateOutputHeight(true);
|
this.modules.commandline.updateOutputHeight(false);
|
||||||
this.nodes.list.scrollIntoView(false);
|
this.nodes.list.scrollIntoView(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -282,7 +282,10 @@ var Downloads = Module("downloads", {
|
|||||||
modules.commandline.echo(function (doc) {
|
modules.commandline.echo(function (doc) {
|
||||||
let downloads = DownloadList(doc, modules);
|
let downloads = DownloadList(doc, modules);
|
||||||
// Temporary and dangerous hack:
|
// Temporary and dangerous hack:
|
||||||
modules.modes.getStack(0).params = downloads;
|
Object.defineProperty(modules.modes.getStack(0), "params", {
|
||||||
|
get: function params() downloads,
|
||||||
|
set: function params(val) { throw FailedAssertion("Not replacing mode change handler", 1) }
|
||||||
|
});
|
||||||
return downloads.nodes.list;
|
return downloads.nodes.list;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user