()
| 399 | } |
| 400 | |
| 401 | func (a *App) switchViewPrev() { |
| 402 | switch a.viewMode { |
| 403 | case ViewModePricing: |
| 404 | a.viewMode = ViewModeSettings |
| 405 | a.settingsView.ActiveSection = views.SettingsSectionHeader |
| 406 | case ViewModeHistory: |
| 407 | a.viewMode = ViewModePricing |
| 408 | a.pricingView.ActiveSection = views.PricingSectionHeader |
| 409 | case ViewModeSettings: |
| 410 | a.viewMode = ViewModeHistory |
| 411 | a.historyView.ActiveSection = views.HistorySectionHeader |
| 412 | if a.db != nil { |
| 413 | a.historyView.History, _ = a.db.GetHistory(100) |
| 414 | } |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | func (a App) submitPricingQuery() (tea.Model, tea.Cmd) { |
| 419 | if a.pricingView.Loading { |
no test coverage detected