Reorder Cancel option in menus to be more consistent (fixes #32)

This commit is contained in:
comp500
2021-06-03 22:54:56 +01:00
parent c6b99a50e2
commit d6bed7ad4c
2 changed files with 2 additions and 2 deletions

View File

@@ -292,6 +292,7 @@ func searchCurseforgeInternal(args []string, mcVersion string) (bool, modInfo) {
menu := wmenu.NewMenu("Choose a number:")
menu.Option("Cancel", nil, false, nil)
if len(fuzzySearchResults) == 0 {
for i, v := range results {
menu.Option(v.Name, v, i == 0, nil)
@@ -301,7 +302,6 @@ func searchCurseforgeInternal(args []string, mcVersion string) (bool, modInfo) {
menu.Option(results[v.Index].Name, results[v.Index], i == 0, nil)
}
}
menu.Option("Cancel", nil, false, nil)
var modInfoData modInfo
var cancelled bool