Skip to content

Commit

Permalink
feat(view): 🚸 time entries Action passes to start command
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNZL committed May 17, 2023
1 parent 3cfe32a commit 7a90598
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/TogglTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1642,8 +1642,12 @@ internal async ValueTask<List<Result>> RequestViewReports(CancellationToken toke
: "view.png",
AutoCompleteText = $"{query.ActionKeyword} {Settings.ViewCommand} {spanConfiguration.Argument} {groupingConfiguration.Argument} {((string.IsNullOrEmpty(subGroup.title)) ? "(no description)" : subGroup.title)}",
Score = (int)elapsed.TotalSeconds,
// TODO: RequestStartEntry, clear selectedProject
// Action = c =>
Action = c =>
{
this._selectedProjectId = project?.id;
this._context.API.ChangeQuery($"{query.ActionKeyword} {Settings.StartCommand} {project?.name?.Kebaberize() ?? "no-project"} {subGroup.title}");
return false;
},
};
});

Expand Down Expand Up @@ -1839,8 +1843,12 @@ internal async ValueTask<List<Result>> RequestViewReports(CancellationToken toke
: "view.png",
AutoCompleteText = $"{query.ActionKeyword} {Settings.ViewCommand} {spanConfiguration.Argument} {groupingConfiguration.Argument} {((string.IsNullOrEmpty(subGroup.title)) ? "(no description)" : subGroup.title)}",
Score = (int)elapsed.TotalSeconds,
// TODO: RequestStartEntry
// Action = c =>
Action = c =>
{
this._selectedProjectId = project?.id;
this._context.API.ChangeQuery($"{query.ActionKeyword} {Settings.StartCommand} {project?.name?.Kebaberize() ?? "no-project"} {subGroup.title}");
return false;
},
};
})
);
Expand Down

0 comments on commit 7a90598

Please sign in to comment.