fix timers
lint / ruff (push) Failing after 15s
tests / desktop (push) Successful in 21s
tests / web (push) Successful in 46s
docker / image (push) Failing after 1m31s
tests / android-core (push) Successful in 1m5s
tests / backend (push) Successful in 2m33s
android / apk (push) Successful in 4m34s
lint / ruff (push) Failing after 15s
tests / desktop (push) Successful in 21s
tests / web (push) Successful in 46s
docker / image (push) Failing after 1m31s
tests / android-core (push) Successful in 1m5s
tests / backend (push) Successful in 2m33s
android / apk (push) Successful in 4m34s
This commit is contained in:
30 files changed
+3331
-419
No files matched your search
@@ -87,8 +87,18 @@ class Api:
|
||||
def resume(self) -> dict:
|
||||
return self._request("POST", "/api/timer/resume", {})
|
||||
|
||||
def complete(self, auto_next: bool = True) -> dict:
|
||||
return self._request("POST", "/api/timer/complete", {"auto_next": auto_next})
|
||||
def complete(self, auto_next: bool = True, session_id: int | None = None) -> dict:
|
||||
"""`session_id` names the interval we think we are finishing.
|
||||
|
||||
The server ignores the call if something else is running by then, which
|
||||
is what keeps two clients hitting zero at the same moment from eating
|
||||
the break the first one's `auto_next` just started.
|
||||
"""
|
||||
return self._request(
|
||||
"POST",
|
||||
"/api/timer/complete",
|
||||
{"auto_next": auto_next, "session_id": session_id},
|
||||
)
|
||||
|
||||
def abandon(self, reason: str | None = None) -> dict:
|
||||
return self._request("POST", "/api/timer/abandon", {"reason": reason})
|
||||
|
||||
Reference in new issue
Block a user