mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 09:45:14 +00:00
fix: Hide google services warning after marked
This commit is contained in:
parent
44532a242b
commit
5adf1aa3af
2 changed files with 5 additions and 14 deletions
|
@ -362,11 +362,13 @@ class ChatListController extends State<ChatList>
|
|||
_hackyWebRTCFixForWeb();
|
||||
CallKeepManager().initialize();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
searchServer = await Store().getItem(_serverStoreNamespace);
|
||||
if (mounted) {
|
||||
searchServer = await Store().getItem(_serverStoreNamespace);
|
||||
Matrix.of(context).backgroundPush?.setupPush();
|
||||
}
|
||||
});
|
||||
|
||||
_checkTorBrowser();
|
||||
Matrix.of(context).backgroundPush?.setupPush();
|
||||
_onSyncStatus =
|
||||
Matrix.of(context).client.onSyncStatus.stream.listen((status) {
|
||||
Logs().v('Sync Status: ${status.status.name}');
|
||||
|
|
|
@ -84,7 +84,6 @@ class BackgroundPush {
|
|||
activeRoomId: router?.currentState?.pathParameters['roomid'],
|
||||
onSelectNotification: goToRoom,
|
||||
),
|
||||
onNewToken: _newFcmToken,
|
||||
);
|
||||
if (Platform.isAndroid) {
|
||||
UnifiedPush.initialize(
|
||||
|
@ -113,21 +112,11 @@ class BackgroundPush {
|
|||
instance.router = router;
|
||||
// ignore: prefer_initializing_formals
|
||||
instance.onFcmError = onFcmError;
|
||||
instance.fullInit();
|
||||
return instance;
|
||||
}
|
||||
|
||||
Future<void> fullInit() => setupPush();
|
||||
|
||||
void handleLoginStateChanged(_) => setupPush();
|
||||
|
||||
StreamSubscription<SyncUpdate>? onRoomSync;
|
||||
|
||||
void _newFcmToken(String token) {
|
||||
_fcmToken = token;
|
||||
setupPush();
|
||||
}
|
||||
|
||||
Future<void> setupPusher({
|
||||
String? gatewayUrl,
|
||||
String? token,
|
||||
|
@ -255,7 +244,7 @@ class BackgroundPush {
|
|||
if (context == null) {
|
||||
return;
|
||||
}
|
||||
if (await store.getItemBool(SettingKeys.showNoGoogle, true) != true) {
|
||||
if (await store.getItemBool(SettingKeys.showNoGoogle, true) == true) {
|
||||
return;
|
||||
}
|
||||
await loadLocale();
|
||||
|
|
Loading…
Reference in a new issue