Skip to content

Commit

Permalink
merge: 🔀 merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNZL committed Jul 3, 2023
2 parents 235d4f6 + 9be3a06 commit 165a26a
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 79 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [3.0.1](https://github.com/JamesNZL/flow-toggl-plugin/compare/v3.0.0...v3.0.1) (2023-07-03)


### Performance

* :zap: implement `CancellationToken` properly ([#87](https://github.com/JamesNZL/flow-toggl-plugin/issues/87)) ([9c88afa](https://github.com/JamesNZL/flow-toggl-plugin/commit/9c88afa23da5051715a8608d0bbe225c8732a130))

## [3.0.0](https://github.com/JamesNZL/flow-toggl-plugin/compare/v2.10.1...v3.0.0) (2023-07-02)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ A performant [Toggl Track](https://track.toggl.com/timer) plugin for [Flow Launc
# Command Reference

> **Note**
> This command reference applies to version `v3.0.0`.
> This command reference applies to version `v3.0.1`.
| Icon | Link |
| -------------------------------------------- | --------------------------- |
Expand Down
10 changes: 5 additions & 5 deletions src/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ await Task.Run(() =>
{
_ = Task.Run(async () =>
{
if (!await this._togglTrack!.VerifyApiToken())
if (!await this._togglTrack!.VerifyApiToken(CancellationToken.None))
{
return;
}
Expand All @@ -72,7 +72,7 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
{
return this._togglTrack!.NotifyNetworkUnavailable();
}
else if (!await this._togglTrack!.VerifyApiToken())
else if (!await this._togglTrack!.VerifyApiToken(token))
{
return this._togglTrack.NotifyInvalidToken();
}
Expand All @@ -83,13 +83,13 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)

// if (string.IsNullOrWhiteSpace(query.Search))
// {
// return await this._togglTrack.GetDefaultHotKeys(prefetch: true);
// return await this._togglTrack.GetDefaultHotKeys(token, prefetch: true);
// }

// string command = query.FirstSearch;
// if (!Settings.Commands.Contains(command) && command == this._state.LastCommand)
// {
// command = (await this._togglTrack.GetDefaultHotKeys())
// command = (await this._togglTrack.GetDefaultHotKeys(token))
// .GroupBy(result => this._context!.API.FuzzySearch(query.FirstSearch, result.Title).Score)
// .MaxBy(group => group.Key)
// ?.MaxBy(result => result.Score)
Expand All @@ -107,7 +107,7 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
// Settings.EditCommand => await this._togglTrack.RequestEditEntry(token, query),
// Settings.DeleteCommand => await this._togglTrack.RequestDeleteEntry(token, query),
// Settings.ReportsCommand => await this._togglTrack.RequestViewReports(token, query),
// _ => (await this._togglTrack.GetDefaultHotKeys())
// _ => (await this._togglTrack.GetDefaultHotKeys(token))
// .FindAll(result =>
// {
// return this._context!.API.FuzzySearch(query.Search, result.Title).Score > 0;
Expand Down
Loading

0 comments on commit 165a26a

Please sign in to comment.