diff --git a/lib/ui/gallery.dart b/lib/ui/gallery.dart index 466266a86..653c42754 100644 --- a/lib/ui/gallery.dart +++ b/lib/ui/gallery.dart @@ -1,11 +1,8 @@ -import 'dart:async'; import 'dart:collection'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:photos/core/event_bus.dart'; -import 'package:photos/events/local_photos_updated_event.dart'; import 'package:photos/models/photo.dart'; import 'package:photos/ui/detail_page.dart'; import 'package:photos/ui/thumbnail_widget.dart'; @@ -30,15 +27,6 @@ class _GalleryState extends State { final List> _collatedPhotos = List>(); Set _selectedPhotos = HashSet(); List _photos; - StreamSubscription _subscription; - - @override - void initState() { - _subscription = Bus.instance.on().listen((event) { - setState(() {}); - }); - super.initState(); - } @override Widget build(BuildContext context) { @@ -181,9 +169,4 @@ class _GalleryState extends State { firstDate.month == secondDate.month && firstDate.day == secondDate.day; } - - void dispose() { - _subscription.cancel(); - super.dispose(); - } }