optimization: don't create page if it won't be navigated to

This commit is contained in:
Drew Weymouth
2023-04-30 12:16:35 -07:00
parent 053474f669
commit 118b19aa13
3 changed files with 9 additions and 3 deletions
+4 -1
View File
@@ -209,7 +209,10 @@ func (b *BrowsingPane) Reload() {
}
}
func (b *BrowsingPane) CurPage() controller.Route {
func (b *BrowsingPane) CurrentPage() controller.Route {
if b.curPage == nil {
return controller.Route{Page: controller.Blank}
}
return b.curPage.Route()
}