Prevent unnecessary reloads

This commit is contained in:
Vishnu Mohandas 2020-05-31 03:30:32 +05:30
parent f6c3881673
commit 0eddd26fcc

View file

@ -34,6 +34,8 @@ class _HomeWidgetState extends State<HomeWidget> {
int _selectedNavBarItem = 0;
Set<Photo> _selectedPhotos = HashSet<Photo>();
StreamSubscription<LocalPhotosUpdatedEvent> _subscription;
final _deviceFolderGalleryWidget = DeviceFolderGalleryWidget();
final _remoteFolderGalleryWidget = RemoteFolderGalleryWidget();
@override
void initState() {
@ -75,8 +77,8 @@ class _HomeWidgetState extends State<HomeWidget> {
});
},
),
DeviceFolderGalleryWidget(),
RemoteFolderGalleryWidget(),
_deviceFolderGalleryWidget,
_remoteFolderGalleryWidget,
],
index: _selectedNavBarItem,
);