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];
|
||||
if (item.updatedRecently) {
|
||||
// the item has been updated recently, and force is not true
|
||||
|
@ -284,9 +284,8 @@ namespace Buypeeb {
|
|||
this.UpdateThread(id);
|
||||
}).ContinueWith(task => {
|
||||
taskLimit.Release();
|
||||
if (refilterWhenDone) {
|
||||
var m = (TreeModelFilter)this.itemTreeView.Model;
|
||||
m.Refilter();
|
||||
if (renderListWhenDone) {
|
||||
this.RenderList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -498,7 +497,7 @@ namespace Buypeeb {
|
|||
// TODO: better. do better.
|
||||
Regex rx = new Regex(@"^http.+yahoo.+");
|
||||
if (rx.IsMatch(url)) {
|
||||
this.UpdateItem(this.settings.Watch(url, name).id);
|
||||
this.UpdateItem(this.settings.Watch(url, name).id, true);
|
||||
this.RenderList();
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue