New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add main page #459
Add main page #459
Conversation
- setup topbar and navigation layout in main page - calculate and display total balance in main page - handle nav items and and page history in main page
|
ui/window.go
Outdated
func (win *Window) changePage(page string) { | ||
win.pages[win.current].onClose() | ||
win.current = page | ||
_ = page | ||
win.refresh() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method doesn't seem to be doing anything, it can be removed. The win.refresh() method isn't needed as well. Each page can handle invalidating the page by calling op.InvalidateOp. The changePageAndRefresh doesn't seem to be doing anything either.
// if *pg.refreshPage { | ||
// common.refreshWindow() | ||
// *pg.refreshPage = false | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be deleted if it's not needed.
The top bar doesn't seem to be updated until I restart the app. I changed the currency conversion option in the settings page and it doesn't get displayed on the top bar until I restart the app. |
* use pageCommmon a pointer across all pages * Add main page - setup topbar and navigation layout in main page - calculate and display total balance in main page - handle nav items and and page history in main page * Remove redundant use of common.Layout function - the common.Layout included the side nav and top bar which was called by every page to render its layout. This removes the general Layout method forcing pages to return only its own layout to the main page.
* use pageCommmon a pointer across all pages * Add main page - setup topbar and navigation layout in main page - calculate and display total balance in main page - handle nav items and and page history in main page * Remove redundant use of common.Layout function - the common.Layout included the side nav and top bar which was called by every page to render its layout. This removes the general Layout method forcing pages to return only its own layout to the main page.
This pr adds a new page,
MainPage
, and its job is to manage the app toolbar, navigation bar, and back stack history of other pages and it also moves the independent management of the page navigation from the pages toMainPage
.