From a698cf8c28f114a596e7dfd16d9a3c471e161edd Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 28 Sep 2026 18:20:36 -0400 Subject: [PATCH] small cleanups --- README.md | 2 +- lib/controllers/client.dart | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index de0c2fa..0c66f00 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ This installs Nexus system-wide. With `enableNotifications`, it also installs KU #### Linux -- On NixOS: Either use direnv and `direnv allow`, or `nix flake develop` +- On NixOS: Either use direnv and `direnv allow`, or `nix develop` - On other distros: Install Flutter, Go, Git, Libclang, Libass, MPV, and Glibc. Do not use any Snap packages, they cause various compilation issues. #### Windows diff --git a/lib/controllers/client.dart b/lib/controllers/client.dart index 4d0c972..07a3025 100644 --- a/lib/controllers/client.dart +++ b/lib/controllers/client.dart @@ -134,7 +134,7 @@ class ClientController extends AsyncNotifier { ); } - dynamic _sendCommand( + Future _sendCommand( String command, [ Map data = const {}, ]) => callGomuksMethod(data, (handle, data) { @@ -156,7 +156,7 @@ class ClientController extends AsyncNotifier { final json = request.toJson(); final content = request.content.toJson(); - return Event.fromJson( + return .fromJson( await _sendCommand("send_event", { ...json, "content": { @@ -241,7 +241,7 @@ class ClientController extends AsyncNotifier { try { return .fromJson(await _sendCommand("get_profile", {"user_id": userId})); } catch (_) { - return ProfileResponse(profile: .new(id: userId)); + return .new(profile: .new(id: userId)); } } @@ -302,9 +302,8 @@ class ClientController extends AsyncNotifier { Future getSpecVersions() async => .fromJson(await _sendCommand("get_versions")); - Future getCapabilities() async => Capabilities.fromJson( - (await _sendCommand("get_capabilities"))["capabilities"], - ); + Future getCapabilities() async => + .fromJson((await _sendCommand("get_capabilities"))["capabilities"]); Future discoverHomeserver(Uri homeserver) async { try {