|
|
@ -46,6 +46,7 @@ type State struct {
|
|
|
|
convertMenuVisible bool
|
|
|
|
convertMenuVisible bool
|
|
|
|
defaultView string
|
|
|
|
defaultView string
|
|
|
|
defaultChartRange string
|
|
|
|
defaultChartRange string
|
|
|
|
|
|
|
|
maxChartWidth int
|
|
|
|
|
|
|
|
|
|
|
|
// DEPRECATED: favorites by 'symbol' is deprecated because of collisions.
|
|
|
|
// DEPRECATED: favorites by 'symbol' is deprecated because of collisions.
|
|
|
|
favoritesBySymbol map[string]bool
|
|
|
|
favoritesBySymbol map[string]bool
|
|
|
@ -110,7 +111,6 @@ type Cointop struct {
|
|
|
|
forceRefresh chan bool
|
|
|
|
forceRefresh chan bool
|
|
|
|
limiter <-chan time.Time
|
|
|
|
limiter <-chan time.Time
|
|
|
|
maxTableWidth int
|
|
|
|
maxTableWidth int
|
|
|
|
maxChartWidth int
|
|
|
|
|
|
|
|
refreshMux sync.Mutex
|
|
|
|
refreshMux sync.Mutex
|
|
|
|
refreshTicker *time.Ticker
|
|
|
|
refreshTicker *time.Ticker
|
|
|
|
saveMux sync.Mutex
|
|
|
|
saveMux sync.Mutex
|
|
|
@ -238,7 +238,6 @@ func NewCointop(config *Config) (*Cointop, error) {
|
|
|
|
apiKeys: new(APIKeys),
|
|
|
|
apiKeys: new(APIKeys),
|
|
|
|
forceRefresh: make(chan bool),
|
|
|
|
forceRefresh: make(chan bool),
|
|
|
|
maxTableWidth: DefaultMaxTableWidth,
|
|
|
|
maxTableWidth: DefaultMaxTableWidth,
|
|
|
|
maxChartWidth: DefaultMaxChartWidth,
|
|
|
|
|
|
|
|
ActionsMap: ActionsMap(),
|
|
|
|
ActionsMap: ActionsMap(),
|
|
|
|
cache: cache.New(1*time.Minute, 2*time.Minute),
|
|
|
|
cache: cache.New(1*time.Minute, 2*time.Minute),
|
|
|
|
colorsDir: config.ColorsDir,
|
|
|
|
colorsDir: config.ColorsDir,
|
|
|
@ -253,6 +252,7 @@ func NewCointop(config *Config) (*Cointop, error) {
|
|
|
|
coinsTableColumns: DefaultCoinTableHeaders,
|
|
|
|
coinsTableColumns: DefaultCoinTableHeaders,
|
|
|
|
currencyConversion: DefaultCurrency,
|
|
|
|
currencyConversion: DefaultCurrency,
|
|
|
|
defaultChartRange: DefaultChartRange,
|
|
|
|
defaultChartRange: DefaultChartRange,
|
|
|
|
|
|
|
|
maxChartWidth: DefaultMaxChartWidth,
|
|
|
|
// DEPRECATED: favorites by 'symbol' is deprecated because of collisions. Kept for backward compatibility.
|
|
|
|
// DEPRECATED: favorites by 'symbol' is deprecated because of collisions. Kept for backward compatibility.
|
|
|
|
favoritesBySymbol: make(map[string]bool),
|
|
|
|
favoritesBySymbol: make(map[string]bool),
|
|
|
|
favorites: make(map[string]bool),
|
|
|
|
favorites: make(map[string]bool),
|
|
|
|