Skip to content

Commit 4c97cdf

Browse files
committed
update all views onchange
1 parent 61d2d1d commit 4c97cdf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/controllers/app_controller.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ namespace App.Controllers {
5858
this.window.remove (element);
5959
}
6060
});
61+
this.view_controler.update_views(this);
6162
var aux = this.view_controler.get_current_view();
62-
aux.update_view(this);
6363
this.window.add (aux);
6464
}
6565

src/controllers/view_controller.vala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,11 @@ namespace App.Controllers {
6161
return state_to_view_dict[this.state];
6262
}
6363

64+
public void update_views(AppController controler) {
65+
foreach (AppView v in state_to_view_dict.values) {
66+
v.update_view(controler);
67+
}
68+
}
69+
6470
}
6571
}

0 commit comments

Comments
 (0)