updated project style guidelines

This commit is contained in:
2024-04-03 19:18:17 +02:00
parent 27618f4404
commit 4c7f53e309
185 changed files with 505 additions and 873 deletions

View File

@ -3,13 +3,13 @@ import 'package:localstore/localstore.dart';
import '../widget/debug/cacheView.dart';
class DataCleaner {
static void cleanOldCache() async {
static Future<void> cleanOldCache() async {
var cacheData = await Localstore.instance.collection(CacheView.collection).get();
cacheData?.forEach((key, value) async {
DateTime lastUpdate = DateTime.fromMillisecondsSinceEpoch(value['lastupdate']);
var lastUpdate = DateTime.fromMillisecondsSinceEpoch(value['lastupdate']);
if(DateTime.now().subtract(const Duration(days: 200)).isAfter(lastUpdate)) {
await Localstore.instance.collection(CacheView.collection).doc(key.split('/').last).delete();
}
});
}
}
}