TF-3157 Update web socket with background service worker

TF-3157 Stub BroadcastChannel for mobile build
This commit is contained in:
DatDang
2024-09-27 10:42:10 +07:00
committed by Dat H. Pham
parent c4d0c27603
commit 7d59982cc9
16 changed files with 414 additions and 67 deletions
@@ -1,7 +1,7 @@
import 'package:get/get.dart';
import 'package:tmail_ui_user/features/base/interactors_bindings.dart';
import 'package:tmail_ui_user/features/push_notification/data/datasource/web_socket_datasource.dart';
import 'package:tmail_ui_user/features/push_notification/data/datasource_impl/remote_web_socket_datasource_impl.dart';
import 'package:tmail_ui_user/features/push_notification/data/datasource_impl/web_socket_datasource_impl.dart';
import 'package:tmail_ui_user/features/push_notification/data/network/web_socket_api.dart';
import 'package:tmail_ui_user/features/push_notification/data/repository/web_socket_repository_impl.dart';
import 'package:tmail_ui_user/features/push_notification/domain/repository/web_socket_repository.dart';
@@ -11,12 +11,12 @@ import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
class WebSocketInteractorBindings extends InteractorsBindings {
@override
void bindingsDataSource() {
Get.lazyPut<WebSocketDatasource>(() => Get.find<RemoteWebSocketDatasourceImpl>());
Get.lazyPut<WebSocketDatasource>(() => Get.find<WebSocketDatasourceImpl>());
}
@override
void bindingsDataSourceImpl() {
Get.lazyPut(() => RemoteWebSocketDatasourceImpl(
Get.lazyPut(() => WebSocketDatasourceImpl(
Get.find<WebSocketApi>(),
Get.find<RemoteExceptionThrower>(),
));