Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove redundant code

vishnukvmdae057da331e9
diff --git a/mobile/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/lib/ui/viewer/actions/file_selection_actions_widget.dart
index e2e29e021e..9de4c27e6a 100644
--- a/mobile/lib/ui/viewer/actions/file_selection_actions_widget.dart
+++ b/mobile/lib/ui/viewer/actions/file_selection_actions_widget.dart
@@ -379,41 +379,36 @@ class _FileSelectionActionsWidgetState
),
);
- if (items.isNotEmpty) {
- final scrollController = ScrollController();
- // h4ck: https://github.com/flutter/flutter/issues/57920#issuecomment-893970066
- return MediaQuery(
- data: MediaQuery.of(context).removePadding(removeBottom: true),
- child: SafeArea(
- child: Scrollbar(
- radius: const Radius.circular(1),
- thickness: 2,
- controller: scrollController,
- thumbVisibility: true,
- child: SingleChildScrollView(
- physics: const BouncingScrollPhysics(
- decelerationRate: ScrollDecelerationRate.fast,
- ),
- scrollDirection: Axis.horizontal,
- child: Container(
- padding: const EdgeInsets.only(bottom: 24),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- const SizedBox(width: 4),
- ...items,
- const SizedBox(width: 4),
- ],
- ),
+ final scrollController = ScrollController();
+ // h4ck: https://github.com/flutter/flutter/issues/57920#issuecomment-893970066
+ return MediaQuery(
+ data: MediaQuery.of(context).removePadding(removeBottom: true),
+ child: SafeArea(
+ child: Scrollbar(
+ radius: const Radius.circular(1),
+ thickness: 2,
+ controller: scrollController,
+ thumbVisibility: true,
+ child: SingleChildScrollView(
+ physics: const BouncingScrollPhysics(
+ decelerationRate: ScrollDecelerationRate.fast,
+ ),
+ scrollDirection: Axis.horizontal,
+ child: Container(
+ padding: const EdgeInsets.only(bottom: 24),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const SizedBox(width: 4),
+ ...items,
+ const SizedBox(width: 4),
+ ],
),
),
),
),
- );
- } else {
- // TODO: Return "Select All" here
- return const SizedBox.shrink();
- }
+ ),
+ );
}
Future<void> _moveFiles() async {