Fix loading of too much views when switching
This commit is contained in:
1 parent
757eef7c2e
commit
9a2df0baab
2 files changed
+7
-6
No files matched your search
+4
-1
@@ -205,11 +205,14 @@
|
||||
if ((!view_type) || (!this.current_view) ||
|
||||
(this.current_view.view_type != view_type)) {
|
||||
var switch_current_view = (function() {
|
||||
this.current_view = this.views.slice(-1);
|
||||
this.current_view = this.views[this.views.length - 1];
|
||||
return this.switch_view(view_type);
|
||||
}.bind(this));
|
||||
for (var i = 0; i < this.number_of_views(); i++) {
|
||||
if (this.view_to_load.length) {
|
||||
if (!view_type) {
|
||||
view_type = this.view_to_load[0];
|
||||
}
|
||||
return this.load_next_view().pipe(switch_current_view);
|
||||
}
|
||||
this.current_view = this.views[
|
||||
|
||||
+3
-5
@@ -87,11 +87,9 @@
|
||||
var toolbar = this.create_toolbar();
|
||||
el.append(toolbar);
|
||||
this.el = el;
|
||||
this.view_prm = this.screen.load_next_view().then(function() {
|
||||
screen.switch_view().done(function() {
|
||||
el.append(screen.screen_container.el);
|
||||
screen.search_filter();
|
||||
});
|
||||
this.view_prm = this.screen.switch_view().done(function() {
|
||||
el.append(screen.screen_container.el);
|
||||
screen.search_filter();
|
||||
});
|
||||
},
|
||||
// TODO translate labels
|
||||
|
||||
Reference in new issue
Block a user