fix #125 - search state not being properly restored
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
### Fixes
|
### Fixes
|
||||||
- **todo-commithash** Don't show update available prompt if the found version is the same as the running app version
|
- **todo-commithash** Don't show update available prompt if the found version is the same as the running app version
|
||||||
- [#120](https://github.com/dweymouth/supersonic/issues/120),[#87](https://github.com/dweymouth/supersonic/issues/87) Update Mac build process to support OS versions back to High Sierra (thanks @whorfin!)
|
- [#120](https://github.com/dweymouth/supersonic/issues/120),[#87](https://github.com/dweymouth/supersonic/issues/87) Update Mac build process to support OS versions back to High Sierra (thanks @whorfin!)
|
||||||
|
- [#125](https://github.com/dweymouth/supersonic/issues/125) Navigating back twice to an albums page with search result clears search state
|
||||||
|
|
||||||
## [0.1.0-beta] - 2023-04-01
|
## [0.1.0-beta] - 2023-04-01
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,8 @@ func restoreAlbumsPage(saved *savedAlbumsPage) *AlbumsPage {
|
|||||||
a.searcher = widgets.NewSearcher()
|
a.searcher = widgets.NewSearcher()
|
||||||
a.searcher.OnSearched = a.OnSearched
|
a.searcher.OnSearched = a.OnSearched
|
||||||
a.searcher.Entry.Text = saved.searchText
|
a.searcher.Entry.Text = saved.searchText
|
||||||
if saved.searchText != "" {
|
a.searchText = saved.searchText
|
||||||
|
if a.searchText != "" {
|
||||||
a.searchGrid = widgets.NewAlbumGridFromState(saved.searchGridState)
|
a.searchGrid = widgets.NewAlbumGridFromState(saved.searchGridState)
|
||||||
}
|
}
|
||||||
a.createContainer(saved.searchText != "")
|
a.createContainer(saved.searchText != "")
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ func restoreGenrePage(saved *savedGenrePage) *GenrePage {
|
|||||||
g.searcher = widgets.NewSearcher()
|
g.searcher = widgets.NewSearcher()
|
||||||
g.searcher.OnSearched = g.OnSearched
|
g.searcher.OnSearched = g.OnSearched
|
||||||
g.searcher.Entry.Text = saved.searchText
|
g.searcher.Entry.Text = saved.searchText
|
||||||
if saved.searchText != "" {
|
g.searchText = saved.searchText
|
||||||
|
if g.searchText != "" {
|
||||||
g.searchGrid = widgets.NewAlbumGridFromState(saved.searchGridState)
|
g.searchGrid = widgets.NewAlbumGridFromState(saved.searchGridState)
|
||||||
}
|
}
|
||||||
g.createContainer(saved.searchText != "")
|
g.createContainer(saved.searchText != "")
|
||||||
|
|||||||
Reference in New Issue
Block a user