TF-1068 implement data layer save recent login username & get all login username
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:tmail_ui_user/features/login/data/model/account_cache.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/authentication_info_cache.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/encryption_key_cache.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/recent_login_url_cache.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/recent_login_username_cache.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/token_oidc_cache.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/data/model/mailbox_cache.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/data/model/mailbox_rights_cache.dart';
|
||||
@@ -76,6 +77,7 @@ class HiveCacheConfig {
|
||||
Hive.registerAdapter(EncryptionKeyCacheAdapter());
|
||||
Hive.registerAdapter(AuthenticationInfoCacheAdapter());
|
||||
Hive.registerAdapter(RecentLoginUrlCacheAdapter());
|
||||
Hive.registerAdapter(RecentLoginUsernameCacheAdapter());
|
||||
}
|
||||
|
||||
Future closeHive() async {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import 'package:tmail_ui_user/features/caching/config/hive_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/recent_login_username_cache.dart';
|
||||
|
||||
class RecentLoginUsernameCacheClient extends HiveCacheClient<RecentLoginUsernameCache> {
|
||||
|
||||
@override
|
||||
String get tableName => 'RecentLoginUsernameCache';
|
||||
}
|
||||
@@ -12,4 +12,5 @@ class CachingConstants {
|
||||
static const int ENCRYPTION_KEY_HIVE_CACHE_IDENTIFY = 10;
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user