refactor: code quality & format

This commit is contained in:
edde746
2026-02-15 04:07:09 +01:00
parent 1641354055
commit 04438c8e45
130 changed files with 1840 additions and 1703 deletions
@@ -252,9 +252,13 @@ class CompanionRemotePeerService {
_failedAuthAttempts++;
if (_failedAuthAttempts >= _maxFailedAuthAttempts) {
_authLockoutUntil = DateTime.now().add(_authLockoutDuration);
appLogger.w('CompanionRemote: Too many failed auth attempts, locked out for ${_authLockoutDuration.inSeconds}s');
appLogger.w(
'CompanionRemote: Too many failed auth attempts, locked out for ${_authLockoutDuration.inSeconds}s',
);
}
appLogger.w('CompanionRemote: Invalid credentials (attempt $_failedAuthAttempts/$_maxFailedAuthAttempts)');
appLogger.w(
'CompanionRemote: Invalid credentials (attempt $_failedAuthAttempts/$_maxFailedAuthAttempts)',
);
socket.add(jsonEncode({'type': 'authFailed', 'message': 'Invalid session ID or PIN'}));
socket.close(4003, 'Invalid credentials');
}
@@ -458,7 +462,7 @@ class CompanionRemotePeerService {
command.type != RemoteCommandType.deviceInfo;
}
void _sendAck(RemoteCommand command) {
void _sendAck(RemoteCommand _) {
sendCommand(const RemoteCommand(type: RemoteCommandType.ack));
}