debug: clear caches
This commit is contained in:
parent
2a7482d6d4
commit
1b5d2a96d5
2 changed files with 28 additions and 7 deletions
|
@ -107,7 +107,7 @@ class ThumbnailCollection extends StatelessWidget {
|
|||
return collection.filters.any((filter) => filter is FavouriteFilter)
|
||||
? const EmptyContent(
|
||||
icon: OMIcons.favoriteBorder,
|
||||
text: 'No favourite!',
|
||||
text: 'No favourites!',
|
||||
)
|
||||
: collection.filters.any((filter) => filter is VideoFilter)
|
||||
? const EmptyContent(
|
||||
|
|
|
@ -49,10 +49,7 @@ class DebugPageState extends State<DebugPage> {
|
|||
children: [
|
||||
const Text('Settings'),
|
||||
RaisedButton(
|
||||
onPressed: () async {
|
||||
await settings.reset();
|
||||
setState(() {});
|
||||
},
|
||||
onPressed: () => settings.reset().then((_) => setState(() {})),
|
||||
child: const Text('Reset settings'),
|
||||
),
|
||||
Text('collectionGroupFactor: ${settings.collectionGroupFactor}'),
|
||||
|
@ -133,8 +130,32 @@ class DebugPageState extends State<DebugPage> {
|
|||
},
|
||||
),
|
||||
const Divider(),
|
||||
Text('Image cache: ${imageCache.currentSize} items, ${formatFilesize(imageCache.currentSizeBytes)}'),
|
||||
Text('SVG cache: ${PictureProvider.cacheCount} items'),
|
||||
Row(
|
||||
children: [
|
||||
Text('Image cache: ${imageCache.currentSize} items, ${formatFilesize(imageCache.currentSizeBytes)}'),
|
||||
const Spacer(),
|
||||
RaisedButton(
|
||||
onPressed: () {
|
||||
imageCache.clear();
|
||||
setState(() {});
|
||||
},
|
||||
child: const Text('Clear'),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text('SVG cache: ${PictureProvider.cacheCount} items'),
|
||||
const Spacer(),
|
||||
RaisedButton(
|
||||
onPressed: () {
|
||||
PictureProvider.clearCache();
|
||||
setState(() {});
|
||||
},
|
||||
child: const Text('Clear'),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Divider(),
|
||||
const Text('Time dilation'),
|
||||
Slider(
|
||||
|
|
Loading…
Reference in a new issue