Skip to content

Commit

Permalink
Fix issue where prices 0 late at night/early morning
Browse files Browse the repository at this point in the history
Market status is PRE but there are no pre-prices, so show
post market prices
  • Loading branch information
exension committed Jul 3, 2019
1 parent e259ae7 commit e9a3885
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/stock_ticker_stream_deck_plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ func (p *plugin) renderTile(t *tile, data StockData) *[]byte {
changePercent = data.PostChangePercent
case "PRE":
status = ""
price = data.PrePrice
change = data.PreChange
if data.PrePrice > 0 {
price = data.PrePrice
change = data.PreChange
} else {
price = data.PostPrice
change = data.PostChange
}
changePercent = data.PreChangePercent
}
arrow := ""
Expand Down
Binary file modified com.exension.stocks.sdPlugin/sdplugin-stocks
Binary file not shown.
Binary file modified release/com.exension.stocks.streamDeckPlugin
Binary file not shown.

0 comments on commit e9a3885

Please sign in to comment.