diff --git a/src/commands/portfolio.zig b/src/commands/portfolio.zig index 137d158..becb5ea 100644 --- a/src/commands/portfolio.zig +++ b/src/commands/portfolio.zig @@ -126,13 +126,9 @@ pub fn run(allocator: std.mem.Allocator, config: zfin.Config, svc: *zfin.DataSer while (it.next()) |v| allocator.free(v.*); candle_map.deinit(); } - { - const stock_syms = try portfolio.stockSymbols(allocator); - defer allocator.free(stock_syms); - for (stock_syms) |sym| { - if (svc.getCachedCandles(sym)) |cs| { - try candle_map.put(sym, cs); - } + for (syms) |sym| { + if (svc.getCachedCandles(sym)) |cs| { + try candle_map.put(sym, cs); } } diff --git a/src/tui/portfolio_tab.zig b/src/tui/portfolio_tab.zig index ff48620..be9d82a 100644 --- a/src/tui/portfolio_tab.zig +++ b/src/tui/portfolio_tab.zig @@ -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 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, .{ .text = text, .style = base_style,