1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-26 00:35:46 +01:00

Update bookmarked status asynchronously.

This commit is contained in:
Kris Maglione
2011-03-15 19:45:04 -04:00
parent eeb24d07a3
commit 4a552b14aa
2 changed files with 30 additions and 7 deletions

View File

@@ -96,7 +96,7 @@ var StatusLine = Module("statusline", {
signals: {
"browser.locationChange": function (webProgress, request, uri) {
let win = webProgress.DOMWindow;
this.updateStatus();
this.status = uri;
this.progress = uri && win && win.dactylProgress || "";
// if this is not delayed we get the position of the old buffer
@@ -235,10 +235,7 @@ var StatusLine = Module("statusline", {
modified += "+";
if (sh && sh.index < sh.count - 1)
modified += "-";
}
if (modules.bookmarkcache) {
if (bookmarkcache.isBookmarked(uri))
if (this.bookmarked)
modified += UTF8("❤");
}
@@ -262,7 +259,12 @@ var StatusLine = Module("statusline", {
this.widgets.url.value = url;
this._status = uri;
},
get bookmarked() this._bookmarked,
set bookmarked(val) {
this._bookmarked = val;
this.status = this.status;
},
updateStatus: function updateStatus() {