TF-524 Clean up recent search cache
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class CleanupRule with EquatableMixin {
|
||||
final Duration cachingEmailPeriod;
|
||||
abstract class CleanupRule with EquatableMixin {
|
||||
|
||||
CleanupRule(this.cachingEmailPeriod);
|
||||
CleanupRule();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cachingEmailPeriod];
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class Duration with EquatableMixin {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
import 'package:tmail_ui_user/features/cleanup/domain/model/cleanup_rule.dart';
|
||||
|
||||
class EmailCleanupRule extends CleanupRule {
|
||||
final Duration cachingEmailPeriod;
|
||||
|
||||
EmailCleanupRule(this.cachingEmailPeriod) : super();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cachingEmailPeriod];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
import 'package:tmail_ui_user/features/cleanup/domain/model/cleanup_rule.dart';
|
||||
|
||||
class RecentSearchCleanupRule extends CleanupRule {
|
||||
final int storageLimit;
|
||||
|
||||
RecentSearchCleanupRule(
|
||||
{this.storageLimit = 10}
|
||||
) : super();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [storageLimit];
|
||||
}
|
||||
Reference in New Issue
Block a user