feat: release v2.0.5 with 10 QoL features (AMOLED, Dynamic Color, Grid switch, Share, Presets, Cache Manager, Backup & Gestures)
This commit is contained in:
Vendored
+6
@@ -62,6 +62,12 @@ class CacheService {
|
||||
});
|
||||
}
|
||||
|
||||
Future<Result<int>> getCachedPostsCount() {
|
||||
return _databaseService.safeRead((isar) async {
|
||||
return isar.cachedPostEntitys.count();
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _evictOverflow(Isar isar, int maxItems) async {
|
||||
final entities = await isar.cachedPostEntitys.where().findAll();
|
||||
if (entities.length <= maxItems) return;
|
||||
|
||||
Reference in New Issue
Block a user