remove old comment/reuse symbols

This commit is contained in:
Emil Lerch 2026-03-19 12:50:51 -07:00
parent 38d9065f4f
commit 46bf34fd1c
Signed by: lobo
GPG key ID: A7B62D657EF764F8
2 changed files with 3 additions and 9 deletions

View file

@ -126,13 +126,9 @@ pub fn run(allocator: std.mem.Allocator, config: zfin.Config, svc: *zfin.DataSer
while (it.next()) |v| allocator.free(v.*); while (it.next()) |v| allocator.free(v.*);
candle_map.deinit(); candle_map.deinit();
} }
{ for (syms) |sym| {
const stock_syms = try portfolio.stockSymbols(allocator); if (svc.getCachedCandles(sym)) |cs| {
defer allocator.free(stock_syms); try candle_map.put(sym, cs);
for (stock_syms) |sym| {
if (svc.getCachedCandles(sym)) |cs| {
try candle_map.put(sym, cs);
}
} }
} }

View file

@ -688,8 +688,6 @@ pub fn drawContent(self: *App, arena: std.mem.Allocator, buf: []vaxis.Cell, widt
const base_style = if (is_cursor) th.selectStyle() else if (a.is_manual_price) th.warningStyle() else th.contentStyle(); const base_style = if (is_cursor) th.selectStyle() else if (a.is_manual_price) th.warningStyle() else th.contentStyle();
const gl_style = if (is_cursor) th.selectStyle() else if (pnl_pct >= 0) th.positiveStyle() else th.negativeStyle(); const gl_style = if (is_cursor) th.selectStyle() else if (pnl_pct >= 0) th.positiveStyle() else th.negativeStyle();
// The gain/loss column starts after market value
// prefix(4) + sym(6+1) + shares(8+1) + avgcost(10+1) + price(10+1) + mv(16+1) = 59
try lines.append(arena, .{ try lines.append(arena, .{
.text = text, .text = text,
.style = base_style, .style = base_style,