Minor refactoring

This commit is contained in:
Neeraj Gupta 2023-01-03 14:03:26 +05:30
parent 9877af76e7
commit bfe09f5436
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
2 changed files with 1 additions and 9 deletions

View file

@ -372,10 +372,6 @@ class _ButtonChildWidgetState extends State<ButtonChildWidget> {
bool get _shouldRegisterGestures =>
!widget.isDisabled && executionState == ExecutionState.idle;
void onTapExternal() async {
return _onTap();
}
void _onTap() async {
if (widget.onTap != null) {
_debouncer.run(

View file

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:photos/core/event_bus.dart';
import 'package:photos/events/collection_updated_event.dart';
@ -78,7 +77,7 @@ class _DeleteEmptyAlbumsState extends State<DeleteEmptyAlbums> {
);
}
Future<bool> _deleteEmptyAlbums() async {
Future<void> _deleteEmptyAlbums() async {
final collections =
await CollectionsService.instance.getCollectionsWithThumbnails();
collections.removeWhere((element) => element.thumbnail != null);
@ -94,13 +93,10 @@ class _DeleteEmptyAlbumsState extends State<DeleteEmptyAlbums> {
} catch (_) {
failedCount++;
}
} else {
return false;
}
}
if (failedCount > 0) {
debugPrint("Delete ops failed for $failedCount collections");
}
return true;
}
}