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:
@@ -1,23 +0,0 @@
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:tmail_ui_user/features/caching/utils/caching_constants.dart';
|
||||
|
||||
part 'fcm_subscription.g.dart';
|
||||
|
||||
@HiveType(typeId: CachingConstants.FCM_SUBSCRIPTION_HIVE_CACHE_IDENTITY)
|
||||
class FCMSubscriptionCache extends HiveObject with EquatableMixin {
|
||||
|
||||
static const String keyCacheValue = 'fcmSubscriptionCache';
|
||||
|
||||
@HiveField(0)
|
||||
final String deviceId;
|
||||
|
||||
@HiveField(1)
|
||||
final String subscriptionId;
|
||||
|
||||
FCMSubscriptionCache(this.deviceId, this.subscriptionId);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [deviceId, subscriptionId];
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:tmail_ui_user/features/caching/utils/caching_constants.dart';
|
||||
|
||||
part 'firebase_registration_cache.g.dart';
|
||||
|
||||
@HiveType(typeId: CachingConstants.FIREBASE_REGISTRATION_HIVE_CACHE_IDENTITY)
|
||||
class FirebaseRegistrationCache extends HiveObject with EquatableMixin {
|
||||
|
||||
static const String keyCacheValue = 'firebaseRegistrationCache';
|
||||
|
||||
@HiveField(0)
|
||||
final String deviceClientId;
|
||||
|
||||
@HiveField(1)
|
||||
final String? id;
|
||||
|
||||
@HiveField(2)
|
||||
final String? token;
|
||||
|
||||
@HiveField(3)
|
||||
final DateTime? expires;
|
||||
|
||||
@HiveField(4)
|
||||
final List<String>? types;
|
||||
|
||||
FirebaseRegistrationCache({
|
||||
required this.deviceClientId,
|
||||
this.id,
|
||||
this.token,
|
||||
this.expires,
|
||||
this.types
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
deviceClientId,
|
||||
id,
|
||||
token,
|
||||
expires,
|
||||
types
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user