general cleanups and mounted guards

This commit is contained in:
Henry Hiles 2026-10-24 12:02:23 -04:00
commit 0a09a4ee0a
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
2 changed files with 33 additions and 22 deletions

View file

@ -200,14 +200,8 @@ class ClientController extends AsyncNotifier<int> {
Future<String?> setState(SetStateRequest request) async =>
await _sendCommand("set_state", request.toJson());
Future<String?> verify(String recoveryKey) async {
try {
await _sendCommand("verify", {"recovery_key": recoveryKey});
return null;
} catch (error) {
return error.toString();
}
}
Future<void> verify(String recoveryKey) =>
_sendCommand("verify", {"recovery_key": recoveryKey});
Future<RecoveryKey> generateRecoveryKey(String passphrase) async => .fromJson(
await _sendCommand("generate_recovery_key", {"passphrase": passphrase}),

View file

@ -169,7 +169,7 @@ class NotificationController
if (Platform.isLinux) {
final portal = await ref.read(PortalController.provider.future);
const escape = HtmlEscape(HtmlEscapeMode.element);
const escape = HtmlEscape(.element);
await portal.notification.addNotification(
id.toString(),