Skip to content

Commit

Permalink
refactor(reader): Use timed call context for pre-display RPC calls
Browse files Browse the repository at this point in the history
  • Loading branch information
bow committed Jan 26, 2024
1 parent eda600a commit 7531ee5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/reader/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ func (r *Reader) Start() error {
defer r.state.MarkIntroSeen()
}
go func() {
r.opr.PopulateFeedsPane(r.display, r.backend.GetAllFeedsF(r.ctx))
r.opr.RefreshStats(r.display, r.backend.GetStatsF(r.ctx))
ctx, cancel := r.callCtx()
defer cancel()
r.opr.PopulateFeedsPane(r.display, r.backend.GetAllFeedsF(ctx))
r.opr.RefreshStats(r.display, r.backend.GetStatsF(ctx))
}()
return r.display.Start()
}
Expand Down

0 comments on commit 7531ee5

Please sign in to comment.