🐛 Bug fixes and optimization

This commit is contained in:
2024-06-09 23:00:11 +08:00
parent 0f24ac03f7
commit 88c99b7467
14 changed files with 63 additions and 26 deletions

View File

@ -54,7 +54,7 @@ class AccountProvider extends GetxController {
}
final AuthProvider auth = Get.find();
auth.ensureCredentials();
await auth.ensureCredentials();
if (auth.credentials == null) await auth.loadCredentials();
@ -185,7 +185,7 @@ class AccountProvider extends GetxController {
late final String provider;
final deviceUuid = await _getDeviceUuid();
if (deviceUuid == null) {
if (deviceUuid == null || deviceUuid.isEmpty) {
log("Unable to active push notifications, couldn't get device uuid");
}

View File

@ -24,7 +24,7 @@ class ChatProvider extends GetxController {
}
final AuthProvider auth = Get.find();
auth.ensureCredentials();
await auth.ensureCredentials();
final uri = Uri.parse(
'${ServiceFinder.services['messaging']}/api/ws?tk=${auth.credentials!.accessToken}'