TF-657 Implement send receipt to sender

This commit is contained in:
dab246
2022-10-19 21:16:04 +07:00
committed by Dat H. Pham
parent 4d7ba01f00
commit 69e7715734
11 changed files with 337 additions and 9 deletions
@@ -9,6 +9,7 @@ import 'package:flutter_appauth/flutter_appauth.dart';
import 'package:get/get.dart';
import 'package:jmap_dart_client/http/http_client.dart' as JmapHttpClient;
import 'package:tmail_ui_user/features/email/data/network/email_api.dart';
import 'package:tmail_ui_user/features/email/data/network/mdn_api.dart';
import 'package:tmail_ui_user/features/login/data/local/account_cache_manager.dart';
import 'package:tmail_ui_user/features/login/data/local/token_oidc_cache_manager.dart';
import 'package:tmail_ui_user/features/login/data/network/authentication_client/authentication_client_base.dart';
@@ -81,6 +82,7 @@ class NetworkBindings extends Bindings {
Get.put(VacationAPI(Get.find<JmapHttpClient.HttpClient>()));
Get.put(ContactAPI(Get.find<JmapHttpClient.HttpClient>()));
Get.put(IdentityAPI(Get.find<JmapHttpClient.HttpClient>()));
Get.put(MdnAPI(Get.find<JmapHttpClient.HttpClient>()));
}
void _bindingConnection() {
@@ -2409,4 +2409,42 @@ class AppLocalizations {
'No',
name: 'no');
}
String get toastMessageNotSupportMdnWhenSendReceipt {
return Intl.message(
'Your account does not support the MDN capability',
name: 'toastMessageNotSupportMdnWhenSendReceipt');
}
String get toastMessageCannotFoundIdentityWhenSendReceipt {
return Intl.message(
'Identity id given cannot be found',
name: 'toastMessageCannotFoundIdentityWhenSendReceipt');
}
String get toastMessageCannotFoundEmailIdWhenSendReceipt {
return Intl.message(
'Email id given cannot be found',
name: 'toastMessageCannotFoundEmailIdWhenSendReceipt');
}
String subjectSendReceiptToSender(String subject) {
return Intl.message(
'Read: $subject',
name: 'subjectSendReceiptToSender',
args: [subject]);
}
String textBodySendReceiptToSender(String sender, String subject, String time) {
return Intl.message(
'Message was read by $sender on $time \n\nSubject: $subject \n\nNote: This Return ReceiptReceipt only acknowledges that the message was displayed on the recipient\'s computer. There is no guarantee that the recipient has read or understood the message contents.',
name: 'textBodySendReceiptToSender',
args: [sender, subject, time]);
}
String get toastMessageSendReceiptSuccess {
return Intl.message(
'A read receipt has been sent.',
name: 'toastMessageSendReceiptSuccess');
}
}