improve handing of downloading/removing book in item view

This commit is contained in:
rlx 2016-01-16 13:47:09 +05:30
parent bec86685b3
commit 3858bef3f4
2 changed files with 6 additions and 7 deletions

View File

@ -32,14 +32,11 @@ oml.ui.deleteItemsDialog = function() {
oml.api.remove({
ids: items
}, function() {
oml.UI.set({listSelection: []});
Ox.Request.clearCache(); // too much?
oml.$ui.info.updateElement();
Ox.Request.clearCache();
oml.reloadLists();
oml.user.ui.item && oml.UI.set({
item: '',
itemView: 'info'
});
if (ui.item) {
oml.$ui.infoView.updateElement(ui.item);
}
});
});

View File

@ -781,6 +781,8 @@ oml.ui.infoView = function(externalData, isMixed) {
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]);
}
}