correctly update mediastate during transfer
This commit is contained in:
parent
9fde49bdce
commit
4cf2c13e7e
2 changed files with 15 additions and 10 deletions
|
@ -53,6 +53,21 @@ oml.ui.appPanel = function() {
|
|||
});
|
||||
}
|
||||
|
||||
oml.bindEvent({
|
||||
transfer: Ox.throttle(function(data) {
|
||||
oml.$ui.list.value(data.id, {
|
||||
mediastate: data.progress < 1 ? 'transferring' : 'available'
|
||||
});
|
||||
oml.$ui.browser.value(data.id, {
|
||||
mediastate: data.progress < 1 ? 'transferring' : 'available'
|
||||
});
|
||||
if (data.progress == 1 && data.id == ui.item) {
|
||||
Ox.Request.clearCache();
|
||||
oml.$ui.infoView.updateElement(ui.item);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
that.reload = function() {
|
||||
Ox.Request.cancel();
|
||||
Ox.Request.clearCache();
|
||||
|
|
|
@ -774,16 +774,6 @@ oml.ui.infoView = function(externalData, isMixed) {
|
|||
that.updateElement(externalData, [$info]);
|
||||
}
|
||||
|
||||
oml.bindEvent({
|
||||
transfer: function(data) {
|
||||
if (data.id == ui.item && data.progress == 1) {
|
||||
Ox.Request.clearCache(); // FIXME: too much
|
||||
oml.$ui.list.value(ui.item, {mediastate: 'available'});
|
||||
oml.$ui.browser.value(ui.item, {mediastate: 'available'});
|
||||
that.updateElement(ui.item, [$icon, $info, $data]);
|
||||
}
|
||||
}
|
||||
});
|
||||
that.bindEvent({
|
||||
mousedown: function() {
|
||||
setTimeout(function() {
|
||||
|
|
Loading…
Reference in a new issue