Use a map of TrackingStates, where the current character is the key, instead of having additional maps for gains.
This is overall simpler and will make restoring sessions with multiple characters an easier process when migrating to sql db.
Simplify the canceling of the polling context.
Before, the Stop function set an isTracking flag which isn't necessary.
Pass context as func params instead of having it as a field.
The context created by wails is necessary to use wails.EventsEmit, and I think this should be owned by the CommandHandler and passed to the tracker methods that need it.
Add getters for common props in BattleLog model
e.g. GetLP, GetCFN etc.
Use a map of TrackingStates, where the
current character
is the key, instead of having additional maps for gains. This is overall simpler and will make restoring sessions with multiple characters an easier process when migrating to sql db.Simplify the canceling of the polling context. Before, the
Stop
function set anisTracking
flag which isn't necessary.Pass context as func params instead of having it as a field. The context created by wails is necessary to use
wails.EventsEmit
, and I think this should be owned by theCommandHandler
and passed to the tracker methods that need it.Add getters for common props in
BattleLog
model e.g. GetLP, GetCFN etc.