Enable toggling waypoint sending characters

This commit is contained in:
2025-08-28 15:33:05 +02:00
parent 2d6af8bfa9
commit 81713d09fd
6 changed files with 185 additions and 67 deletions

10
app.go
View File

@@ -124,7 +124,7 @@ func (a *App) ListCharacters() ([]CharacterInfo, error) {
}
list := make([]CharacterInfo, 0, len(tokens))
for _, t := range tokens {
list = append(list, CharacterInfo{CharacterID: t.CharacterID, CharacterName: t.CharacterName})
list = append(list, CharacterInfo{CharacterID: t.CharacterID, CharacterName: t.CharacterName, WaypointEnabled: t.WaypointEnabled})
}
return list, nil
}
@@ -139,6 +139,14 @@ func (a *App) GetCharacterLocations() ([]CharacterLocation, error) {
return a.ssi.GetCharacterLocations(ctx)
}
// ToggleCharacterWaypointEnabled toggles waypoint enabled status for a character
func (a *App) ToggleCharacterWaypointEnabled(characterID int64) error {
if a.ssi == nil {
return errors.New("ESI not initialised")
}
return a.ssi.ToggleCharacterWaypointEnabled(characterID)
}
// SystemRegion holds system + region names from local DB
type SystemRegion struct {
System string `json:"system"`