Skip to content

Commit

Permalink
Merge branch 'main' into tgl-view
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNZL committed May 16, 2023
2 parents eaea4a0 + 44d2a29 commit b4ed9ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 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.

### [2.1.6](https://github.com/JamesNZL/flow-toggl-plugin/compare/v2.1.5...v2.1.6) (2023-05-16)


### Bug Fixes

* **ux:** :bug: fix `start` crash when no previous time entries ([#7](https://github.com/JamesNZL/flow-toggl-plugin/issues/7)) ([196b68e](https://github.com/JamesNZL/flow-toggl-plugin/commit/196b68ef35506c174517f36cfa04080954c1e579))

### [2.1.5](https://github.com/JamesNZL/flow-toggl-plugin/compare/v2.1.4...v2.1.5) (2023-05-16)


Expand Down
4 changes: 2 additions & 2 deletions src/TogglTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ internal async ValueTask<List<Result>> RequestStartEntry(CancellationToken token
}

// Use cached time entries here to ensure responsiveness
var likelyPastTimeEntry = (await this._GetTimeEntries())?.First();
var likelyPastTimeEntry = (await this._GetTimeEntries())?.FirstOrDefault();
if ((likelyPastTimeEntry is null) || (likelyPastTimeEntry.stop is null))
{
return results;
Expand All @@ -605,7 +605,7 @@ internal async ValueTask<List<Result>> RequestStartEntry(CancellationToken token
// Force a new fetch to ensure correctness
// User input has ended at this point so no responsiveness concerns
var lastTimeEntry = (await this._GetTimeEntries(true))?.First();
var lastTimeEntry = (await this._GetTimeEntries(true))?.FirstOrDefault();
if (lastTimeEntry is null)
{
throw new Exception("There is no previous time entry.");
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "Toggl Track",
"Description": "A time tracking plugin for Flow Launcher using Toggl Track",
"Author": "JamesNZL",
"Version": "2.1.5",
"Version": "2.1.6",
"Language": "csharp",
"Website": "https://github.com/JamesNZL/flow-toggl-plugin",
"IcoPath": "app.png",
Expand Down

0 comments on commit b4ed9ce

Please sign in to comment.