TF-2298 Update expires time when old token has expired
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit fb26afe8f52df6e16476aea8a68f9f92c5c4b001)
This commit is contained in:
@@ -14,7 +14,7 @@ import 'package:tmail_ui_user/features/caching/clients/hive_cache_version_client
|
||||
import 'package:tmail_ui_user/features/caching/clients/mailbox_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/caching/clients/recent_search_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/caching/clients/state_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/caching/clients/subscription_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/caching/clients/firebase_registration_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/caching/utils/caching_constants.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/data/model/state_type.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox_dashboard/data/local/local_spam_report_manager.dart';
|
||||
@@ -28,7 +28,7 @@ class CachingManager {
|
||||
final RecentSearchCacheClient _recentSearchCacheClient;
|
||||
final AccountCacheClient _accountCacheClient;
|
||||
final FcmCacheClient _fcmCacheClient;
|
||||
final FCMSubscriptionCacheClient _fcmSubscriptionCacheClient;
|
||||
final FirebaseRegistrationCacheClient _firebaseRegistrationCacheClient;
|
||||
final HiveCacheVersionClient _hiveCacheVersionClient;
|
||||
final NewEmailHiveCacheClient _newEmailHiveCacheClient;
|
||||
final OpenedEmailHiveCacheClient _openedEmailHiveCacheClient;
|
||||
@@ -44,7 +44,7 @@ class CachingManager {
|
||||
this._recentSearchCacheClient,
|
||||
this._accountCacheClient,
|
||||
this._fcmCacheClient,
|
||||
this._fcmSubscriptionCacheClient,
|
||||
this._firebaseRegistrationCacheClient,
|
||||
this._hiveCacheVersionClient,
|
||||
this._newEmailHiveCacheClient,
|
||||
this._openedEmailHiveCacheClient,
|
||||
@@ -60,7 +60,7 @@ class CachingManager {
|
||||
_mailboxCacheClient.clearAllData(),
|
||||
_emailCacheClient.clearAllData(),
|
||||
_fcmCacheClient.clearAllData(),
|
||||
_fcmSubscriptionCacheClient.clearAllData(),
|
||||
_firebaseRegistrationCacheClient.clearAllData(),
|
||||
_recentSearchCacheClient.clearAllData(),
|
||||
_accountCacheClient.clearAllData(),
|
||||
_localSpamReportManager.clear(),
|
||||
@@ -80,7 +80,7 @@ class CachingManager {
|
||||
_mailboxCacheClient.clearAllData(),
|
||||
_emailCacheClient.clearAllData(),
|
||||
_fcmCacheClient.clearAllData(),
|
||||
_fcmSubscriptionCacheClient.clearAllData(),
|
||||
_firebaseRegistrationCacheClient.clearAllData(),
|
||||
_recentSearchCacheClient.clearAllData(),
|
||||
_localSpamReportManager.clear(),
|
||||
if (PlatformInfo.isMobile)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
import 'package:tmail_ui_user/features/caching/config/hive_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/caching/utils/caching_constants.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/model/firebase_registration_cache.dart';
|
||||
|
||||
class FirebaseRegistrationCacheClient extends HiveCacheClient<FirebaseRegistrationCache> {
|
||||
|
||||
@override
|
||||
String get tableName => CachingConstants.firebaseRegistrationCacheBoxName;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
|
||||
import 'package:tmail_ui_user/features/caching/config/hive_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/model/fcm_subscription.dart';
|
||||
|
||||
class FCMSubscriptionCacheClient extends HiveCacheClient<FCMSubscriptionCache> {
|
||||
|
||||
@override
|
||||
String get tableName => 'FCMSubscriptionCache';
|
||||
}
|
||||
@@ -26,7 +26,7 @@ import 'package:tmail_ui_user/features/offline_mode/model/attachment_hive_cache.
|
||||
import 'package:tmail_ui_user/features/offline_mode/model/detailed_email_hive_cache.dart';
|
||||
import 'package:tmail_ui_user/features/offline_mode/model/email_header_hive_cache.dart';
|
||||
import 'package:tmail_ui_user/features/offline_mode/model/sending_email_hive_cache.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/model/fcm_subscription.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/model/firebase_registration_cache.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/model/email_address_hive_cache.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/model/email_cache.dart';
|
||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||
@@ -145,9 +145,9 @@ class HiveCacheConfig {
|
||||
RecentLoginUsernameCacheAdapter(),
|
||||
CachingConstants.RECENT_LOGIN_USERNAME_HIVE_CACHE_IDENTITY
|
||||
);
|
||||
registerCacheAdapter<FCMSubscriptionCache>(
|
||||
FCMSubscriptionCacheAdapter(),
|
||||
CachingConstants.FCM_SUBSCRIPTION_HIVE_CACHE_IDENTITY
|
||||
registerCacheAdapter<FirebaseRegistrationCache>(
|
||||
FirebaseRegistrationCacheAdapter(),
|
||||
CachingConstants.FIREBASE_REGISTRATION_HIVE_CACHE_IDENTITY
|
||||
);
|
||||
registerCacheAdapter<AttachmentHiveCache>(
|
||||
AttachmentHiveCacheAdapter(),
|
||||
|
||||
@@ -13,7 +13,7 @@ class CachingConstants {
|
||||
static const int AUTHENTICATION_INFO_HIVE_CACHE_IDENTIFY = 11;
|
||||
static const int RECENT_LOGIN_URL_HIVE_CACHE_IDENTITY = 12;
|
||||
static const int RECENT_LOGIN_USERNAME_HIVE_CACHE_IDENTITY = 13;
|
||||
static const int FCM_SUBSCRIPTION_HIVE_CACHE_IDENTITY = 14;
|
||||
static const int FIREBASE_REGISTRATION_HIVE_CACHE_IDENTITY = 14;
|
||||
static const int ATTACHMENT_HIVE_CACHE_ID = 15;
|
||||
static const int EMAIL_HEADER_HIVE_CACHE_ID = 16;
|
||||
static const int DETAILED_EMAIL_HIVE_CACHE_ID = 17;
|
||||
@@ -25,6 +25,7 @@ class CachingConstants {
|
||||
static const String openedEmailCacheBoxName = 'opened_email_cache_box';
|
||||
static const String sendingEmailCacheBoxName = 'sending_email_cache_box';
|
||||
static const String sessionCacheBoxName = 'session_cache_box';
|
||||
static const String firebaseRegistrationCacheBoxName = 'firebase_registration_cache_box';
|
||||
|
||||
static const String newEmailsContentFolderName = 'new_emails';
|
||||
static const String openedEmailContentFolderName = 'opened_email';
|
||||
|
||||
Reference in New Issue
Block a user