MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / refresh_task_list

Function refresh_task_list

src/tui/run.rs:178–184  ·  view source on GitHub ↗

Reload tasks from storage, sort for display, and update the TUI.

(app: &mut TuiApp, storage: &TaskStorage)

Source from the content-addressed store, hash-verified

176
177/// Reload tasks from storage, sort for display, and update the TUI.
178async fn refresh_task_list(app: &mut TuiApp, storage: &TaskStorage) {
179 if let Ok(tasks) = storage.list_tasks().await {
180 let mut tasks: Vec<_> = tasks.into_iter().rev().collect();
181 sort_tasks_for_display(&mut tasks);
182 app.update_tasks(tasks);
183 }
184}
185
186/// Process a server event, updating app state accordingly.
187async fn process_server_event(app: &mut TuiApp, event: &ServerEvent, storage: &TaskStorage) {

Callers 2

run_tuiFunction · 0.85
process_server_eventFunction · 0.85

Calls 3

sort_tasks_for_displayFunction · 0.85
list_tasksMethod · 0.80
update_tasksMethod · 0.80

Tested by

no test coverage detected