TF-4385 Fix spam banner show it once per day
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ class HiveSpamReportDataSourceImpl extends SpamReportDataSource {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<DateTime> getLastTimeDismissedSpamReported() {
|
||||
Future<int> getLastTimeDismissedSpamReportedMilliseconds() {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -21,12 +21,10 @@ class LocalSpamReportDataSourceImpl extends SpamReportDataSource {
|
||||
);
|
||||
|
||||
@override
|
||||
Future<DateTime> getLastTimeDismissedSpamReported() async {
|
||||
Future<int> getLastTimeDismissedSpamReportedMilliseconds() async {
|
||||
return Future.sync(() async {
|
||||
final spamReportConfig = await _preferencesSettingManager.getSpamReportConfig();
|
||||
return DateTime.fromMillisecondsSinceEpoch(
|
||||
spamReportConfig.lastTimeDismissedMilliseconds,
|
||||
);
|
||||
return spamReportConfig.lastTimeDismissedMilliseconds;
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user