Refresh search options after changing search criteria
This commit is contained in:
parent
80eb8696ca
commit
779adfd274
|
@ -19,8 +19,9 @@ var (
|
|||
SetCode: "",
|
||||
Foil: logic.Either,
|
||||
Promo: logic.Either,
|
||||
Language: "en",
|
||||
Language: "",
|
||||
}
|
||||
shouldRefreshSearch bool = true
|
||||
searchOptions logic.SearchOptions
|
||||
)
|
||||
|
||||
|
@ -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