refactor: Add more stricter lints

This commit is contained in:
Christian Kußowski 2026-02-20 14:03:46 +01:00
commit 5283d0fcc8
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
15 changed files with 66 additions and 60 deletions

View file

@ -231,7 +231,7 @@ class BackgroundPush {
currentPushers.first.data.format ==
AppSettings.pushNotificationsPusherFormat.value &&
mapEquals(currentPushers.single.data.additionalProperties, {
"data_message": pusherDataMessageFormat,
'data_message': pusherDataMessageFormat,
})) {
Logs().i('[Push] Pusher already set');
} else {
@ -269,7 +269,7 @@ class BackgroundPush {
data: PusherData(
url: Uri.parse(gatewayUrl!),
format: AppSettings.pushNotificationsPusherFormat.value,
additionalProperties: {"data_message": pusherDataMessageFormat},
additionalProperties: {'data_message': pusherDataMessageFormat},
),
kind: 'http',
),
@ -290,7 +290,7 @@ class BackgroundPush {
static bool _wentToRoomOnStartup = false;
Future<void> setupPush() async {
Logs().d("SetupPush");
Logs().d('SetupPush');
if (client.onLoginStateChanged.value != LoginState.loggedIn ||
!PlatformInfos.isMobile ||
matrix == null) {
@ -371,7 +371,7 @@ class BackgroundPush {
Future<void> setupUp() async {
await UnifiedPushUi(
context: matrix!.context,
instances: ["default"],
instances: ['default'],
unifiedPushFunctions: UPFunctions(),
showNoDistribDialog: false,
onNoDistribDialogDismissed: () {}, // TODO: Implement me

View file

@ -15,11 +15,11 @@ class ErrorReporter {
const ErrorReporter(this.context, [this.message]);
static const Set<String> ingoredTypes = {
"IOException",
"ClientException",
"SocketException",
"TlsException",
"HandshakeException",
'IOException',
'ClientException',
'SocketException',
'TlsException',
'HandshakeException',
};
void onErrorCallback(Object error, [StackTrace? stackTrace]) {

View file

@ -141,7 +141,7 @@ class VoipPlugin with WidgetsBindingObserver implements WebRTCDelegate {
FlutterForegroundTask.setOnLockScreenVisibility(false);
FlutterForegroundTask.stopService();
final wasForeground = matrix.store.getString('wasForeground');
wasForeground == 'false' ? FlutterForegroundTask.minimizeApp() : null;
if (wasForeground == 'false') FlutterForegroundTask.minimizeApp();
}
}
}