Commit 8e0e98a7 authored by MrMan's avatar MrMan

Switch to the currentPage model to prevent flickering LHS navigation

parent 8d43cd16
......@@ -477,10 +477,29 @@ var ImportantPage = {
var MailContent = {
oninit: function() {
this.subpage = "inbox";
view: function() {
var path = m.route.get();
// Decide *which* view to show
switch (path) {
case "/starred": return m(StarredPage);
case "/draft": return m(DraftPage);
case "/important": return m(ImportantPage);
case "/inbox":
return m(InboxPage, {newCount: 2});
m.route(document.body, "/inbox", {
"/inbox": InboxPage,
"/starred": StarredPage,
"/draft": DraftPage,
"/important": ImportantPage,
"/inbox": MailContent,
"/starred": MailContent,
"/draft": MailContent,
"/important": MailContent,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment