TF-438 Remove func not used
This commit is contained in:
@@ -21,10 +21,6 @@ class FcmReceiver {
|
||||
FirebaseMessaging.onMessage.listen(FcmService.instance.handleFirebaseForegroundMessage);
|
||||
}
|
||||
|
||||
void onMessageOpenedApp() {
|
||||
FirebaseMessaging.onMessageOpenedApp.listen(FcmService.instance.handleFirebaseMessageOpenedApp);
|
||||
}
|
||||
|
||||
void onBackgroundMessage() {
|
||||
FirebaseMessaging.onBackgroundMessage(handleFirebaseBackgroundMessage);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ class FcmService {
|
||||
Stream<RemoteMessage> get backgroundMessageStream => backgroundMessageStreamController.stream;
|
||||
|
||||
FirebaseToken? currentToken;
|
||||
int semaphore = 0;
|
||||
|
||||
FcmService._internal();
|
||||
|
||||
@@ -26,12 +25,8 @@ class FcmService {
|
||||
static FcmService get instance => _instance;
|
||||
|
||||
void handleFirebaseForegroundMessage(RemoteMessage newRemoteMessage) {
|
||||
if (semaphore != 0) {
|
||||
return;
|
||||
}
|
||||
semaphore = 1;
|
||||
Future.delayed(const Duration(milliseconds: durationMessageComing)).then((_) => semaphore = 0);
|
||||
|
||||
log('FcmService::handleFirebaseForegroundMessage():messageId: ${newRemoteMessage.messageId}');
|
||||
log('FcmService::handleFirebaseForegroundMessage():message: ${newRemoteMessage.data}');
|
||||
foregroundMessageStreamController.add(newRemoteMessage);
|
||||
}
|
||||
|
||||
@@ -40,10 +35,6 @@ class FcmService {
|
||||
backgroundMessageStreamController.add(newRemoteMessage);
|
||||
}
|
||||
|
||||
void handleFirebaseMessageOpenedApp(RemoteMessage newRemoteMessage) {
|
||||
log('FcmService::handleFirebaseMessageOpenedApp():newRemoteMessage: ${newRemoteMessage.data}');
|
||||
}
|
||||
|
||||
void _closeStream() {
|
||||
foregroundMessageStreamController.close();
|
||||
backgroundMessageStreamController.close();
|
||||
|
||||
Reference in New Issue
Block a user