[Thread Detail] [Part 1] TF-3639 data layer and controller (#3645)

This commit is contained in:
Dat Dang
2025-05-07 11:10:39 +07:00
committed by Dat H. Pham
parent 1bd0705fb3
commit 7c3af832e4
11 changed files with 231 additions and 0 deletions
@@ -0,0 +1,20 @@
import 'package:core/data/model/source_type/data_source_type.dart';
import 'package:jmap_dart_client/jmap/account_id.dart';
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
import 'package:tmail_ui_user/features/thread_detail/data/data_source/thread_detail_data_source.dart';
import 'package:tmail_ui_user/features/thread_detail/domain/repository/thread_detail_repository.dart';
class ThreadDetailRepositoryImpl implements ThreadDetailRepository {
const ThreadDetailRepositoryImpl(this.threadDetailDataSource);
final Map<DataSourceType, ThreadDetailDataSource> threadDetailDataSource;
@override
Future<List<EmailId>> getThreadById(
ThreadId threadId,
AccountId accountId
) {
return threadDetailDataSource[DataSourceType.network]!
.getThreadById(threadId, accountId);
}
}