[mob] Keep send link as first option

This commit is contained in:
Neeraj Gupta 2024-06-28 13:38:23 +05:30
parent ea6e098583
commit 8613f5e73f

View File

@ -137,24 +137,7 @@ class _FileSelectionActionsWidgetState
//and set [shouldShow] to false for items that should not be shown and true
//for items that should be shown.
final List<SelectionActionButton> items = [];
if (widget.type == GalleryType.peopleTag && widget.person != null) {
items.add(
SelectionActionButton(
icon: Icons.remove_circle_outline,
labelText: 'Not ${widget.person!.data.name}?',
onTap: anyUploadedFiles ? _onNotpersonClicked : null,
),
);
if (ownedFilesCount == 1) {
items.add(
SelectionActionButton(
icon: Icons.image_outlined,
labelText: 'Use as cover',
onTap: anyUploadedFiles ? _setPersonCover : null,
),
);
}
}
if (widget.type.showCreateLink()) {
if (_cachedCollectionForSharedLink != null && anyUploadedFiles) {
items.add(
@ -176,6 +159,24 @@ class _FileSelectionActionsWidgetState
);
}
}
if (widget.type == GalleryType.peopleTag && widget.person != null) {
items.add(
SelectionActionButton(
icon: Icons.remove_circle_outline,
labelText: 'Not ${widget.person!.data.name}?',
onTap: anyUploadedFiles ? _onNotpersonClicked : null,
),
);
if (ownedFilesCount == 1) {
items.add(
SelectionActionButton(
icon: Icons.image_outlined,
labelText: 'Use as cover',
onTap: anyUploadedFiles ? _setPersonCover : null,
),
);
}
}
final showUploadIcon = widget.type == GalleryType.localFolder &&
split.ownedByCurrentUser.isEmpty;