reorder list when updating added items
This commit is contained in:
parent
9c983d82f4
commit
ef39809d13
1 changed files with 4 additions and 5 deletions
|
@ -270,7 +270,7 @@ namespace Buypeeb {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateItem(string id, bool refilterWhenDone = false) {
|
private void UpdateItem(string id, bool renderListWhenDone = false) {
|
||||||
var item = this.settings.watchlist[id];
|
var item = this.settings.watchlist[id];
|
||||||
if (item.updatedRecently) {
|
if (item.updatedRecently) {
|
||||||
// the item has been updated recently, and force is not true
|
// the item has been updated recently, and force is not true
|
||||||
|
@ -284,9 +284,8 @@ namespace Buypeeb {
|
||||||
this.UpdateThread(id);
|
this.UpdateThread(id);
|
||||||
}).ContinueWith(task => {
|
}).ContinueWith(task => {
|
||||||
taskLimit.Release();
|
taskLimit.Release();
|
||||||
if (refilterWhenDone) {
|
if (renderListWhenDone) {
|
||||||
var m = (TreeModelFilter)this.itemTreeView.Model;
|
this.RenderList();
|
||||||
m.Refilter();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -498,7 +497,7 @@ namespace Buypeeb {
|
||||||
// TODO: better. do better.
|
// TODO: better. do better.
|
||||||
Regex rx = new Regex(@"^http.+yahoo.+");
|
Regex rx = new Regex(@"^http.+yahoo.+");
|
||||||
if (rx.IsMatch(url)) {
|
if (rx.IsMatch(url)) {
|
||||||
this.UpdateItem(this.settings.Watch(url, name).id);
|
this.UpdateItem(this.settings.Watch(url, name).id, true);
|
||||||
this.RenderList();
|
this.RenderList();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue