Add sharing option for local folders within app bar

This commit is contained in:
Vishnu Mohandas 2020-10-10 00:02:26 +05:30
parent 1330ef07d2
commit 88c09ace89

View file

@ -87,18 +87,27 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
List<Widget> _getDefaultActions(BuildContext context) {
List<Widget> actions = List<Widget>();
if (Configuration.instance.hasConfiguredAccount()) {
actions.add(IconButton(
icon: Icon(Icons.settings),
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return SettingsPage();
},
),
);
},
));
if (widget.type == GalleryAppBarType.homepage) {
actions.add(IconButton(
icon: Icon(Icons.settings),
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return SettingsPage();
},
),
);
},
));
} else if (widget.type == GalleryAppBarType.local_folder) {
actions.add(IconButton(
icon: Icon(Icons.share),
onPressed: () {
_showShareCollectionDialog();
},
));
}
} else {
actions.add(IconButton(
icon: Icon(Icons.sync_disabled),