Commit ab92766619

ab92766619cde0f3d2c1edbeecb7239beb856421

parent: 0d0854a2a9

Unsigned

Wraient <wraient.911@gmail.com> · 2024-10-26 15:18 UTC

Add: Quit in anime selection

Layout: unified · split

internal/curd.go +2 −2
@@ -260,8 +260,8 @@ func SetupCurd(userCurdConfig *CurdConfig, anime *Anime, user *User, databaseAni
260260 ExitCurd(fmt.Errorf("Error selecting anime"))
261261 }
262262
263 if anilistSelectedOption.Key == "-1" || anilistSelectedOption.Label == "quit" {
264 ExitCurd(fmt.Errorf("Quit"))
263 if anilistSelectedOption.Key == "-1" {
264 ExitCurd(nil)
265265 }
266266
267267 if anilistSelectedOption.Label == "add_new" {
internal/selection_menu.go +4
@@ -162,6 +162,10 @@ func (m *Model) filterOptions() {
162162 Key: "add_new",
163163 })
164164 }
165 m.filteredKeys = append(m.filteredKeys, SelectionOption{
166 Label: "Quit",
167 Key: "-1",
168 })
165169}
166170
167171// DynamicSelect displays a simple selection prompt without extra features