Refresh search options after changing search criteria
This commit is contained in:
parent
80eb8696ca
commit
779adfd274
|
@ -19,9 +19,10 @@ var (
|
|||
SetCode: "",
|
||||
Foil: logic.Either,
|
||||
Promo: logic.Either,
|
||||
Language: "en",
|
||||
Language: "",
|
||||
}
|
||||
searchOptions logic.SearchOptions
|
||||
shouldRefreshSearch bool = true
|
||||
searchOptions logic.SearchOptions
|
||||
)
|
||||
|
||||
func getSearchCriteria() {
|
||||
|
@ -29,10 +30,11 @@ func getSearchCriteria() {
|
|||
searchCriteria.Foil = GetTriadicResponse("Foil (y/n/E):")
|
||||
searchCriteria.Promo = GetTriadicResponse("Promo (y/n/E):")
|
||||
searchCriteria.Language = GetStringResponse("Language:")
|
||||
shouldRefreshSearch = true
|
||||
}
|
||||
|
||||
func getSearchOptions(db *sql.DB) {
|
||||
if searchOptions == nil {
|
||||
if shouldRefreshSearch {
|
||||
fmt.Println("LOADING")
|
||||
options, err := logic.GetAllSearchOptions(db, searchCriteria)
|
||||
logic.Check(err)
|
||||
|
|
Loading…
Reference in New Issue