Ensure that on delete a refresh is triggered
This commit is contained in:
parent
985fd2f38a
commit
3660aadd3d
1 changed files with 1 additions and 15 deletions
|
@ -22,15 +22,6 @@ class DeviceFolderPage extends StatefulWidget {
|
|||
class _DeviceFolderPageState extends State<DeviceFolderPage> {
|
||||
final logger = Logger("DeviceFolderPageState");
|
||||
Set<File> _selectedFiles = Set<File>();
|
||||
StreamSubscription<LocalPhotosUpdatedEvent> _subscription;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_subscription = Bus.instance.on<LocalPhotosUpdatedEvent>().listen((event) {
|
||||
setState(() {});
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(Object context) {
|
||||
|
@ -54,6 +45,7 @@ class _DeviceFolderPageState extends State<DeviceFolderPage> {
|
|||
_selectedFiles = selectedFiles;
|
||||
});
|
||||
},
|
||||
reloadEvent: Bus.instance.on<LocalPhotosUpdatedEvent>(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -70,10 +62,4 @@ class _DeviceFolderPageState extends State<DeviceFolderPage> {
|
|||
}
|
||||
return filteredFiles;
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_subscription.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue