Merge pull request #12593 from nextcloud/backport/12554/stable14
[stable14] Do not switch to root folder if filelist is already shown
This commit is contained in:
commit
e1873e8928
|
@ -593,8 +593,13 @@
|
|||
*/
|
||||
_onShow: function(e) {
|
||||
if (this.shown) {
|
||||
this._setCurrentDir('/', false);
|
||||
this.reload();
|
||||
if (e.itemId === this.id) {
|
||||
this._setCurrentDir('/', false);
|
||||
}
|
||||
// Only reload if we don't navigate to a different directory
|
||||
if (typeof e.dir === 'undefined' || e.dir === this.getCurrentDirectory()) {
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
this.shown = true;
|
||||
},
|
||||
|
|
|
@ -119,7 +119,12 @@
|
|||
this.$currentContent = $('#app-content-' + (typeof itemView === 'string' && itemView !== '' ? itemView : itemId));
|
||||
this.$currentContent.removeClass('hidden');
|
||||
if (!options || !options.silent) {
|
||||
this.$currentContent.trigger(jQuery.Event('show'));
|
||||
this.$currentContent.trigger(jQuery.Event('show', {
|
||||
itemId: itemId,
|
||||
previousItemId: oldItemId,
|
||||
dir: itemDir,
|
||||
view: itemView
|
||||
}));
|
||||
this.$el.trigger(
|
||||
new $.Event('itemChanged', {
|
||||
itemId: itemId,
|
||||
|
|
Loading…
Reference in New Issue