general cleanups and mounted guards
This commit is contained in:
parent
62e200f305
commit
0a09a4ee0a
2 changed files with 33 additions and 22 deletions
|
|
@ -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}),
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue