Update SDK

This commit is contained in:
Sorunome
2020-08-16 12:54:43 +02:00
parent dbe459958d
commit da9eafa3c0
31 changed files with 1394 additions and 261 deletions

View File

@ -53,7 +53,7 @@ abstract class FirebaseController {
}
return;
}
final pushers = await client.api.requestPushers();
final pushers = await client.requestPushers();
final currentPushers = pushers.where((pusher) => pusher.pushkey == token);
if (currentPushers.length == 1 &&
currentPushers.first.kind == 'http' &&
@ -69,14 +69,14 @@ abstract class FirebaseController {
for (final currentPusher in currentPushers) {
currentPusher.pushkey = token;
currentPusher.kind = 'null';
await client.api.setPusher(
await client.setPusher(
currentPusher,
append: true,
);
debugPrint('[Push] Remove legacy pusher for this device');
}
}
await client.api.setPusher(
await client.setPusher(
Pusher(
token,
APP_ID,