Skip to content

armgit / ente

Public Imported from GitHub
0

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

Add scrollbar to all on ente albums page

ashilkn1d1e01898f97
diff --git a/mobile/lib/ui/collections/collection_list_page.dart b/mobile/lib/ui/collections/collection_list_page.dart
index f8380bc3de..3bc168a9d6 100644
--- a/mobile/lib/ui/collections/collection_list_page.dart
+++ b/mobile/lib/ui/collections/collection_list_page.dart
@@ -52,6 +52,7 @@ class _CollectionListPageState extends State<CollectionListPage> {
AlbumSortDirection? albumSortDirection;
String _searchQuery = "";
final _selectedAlbum = SelectedAlbums();
+ late final ScrollController _scrollController;
@override
void initState() {
@@ -64,11 +65,15 @@ class _CollectionListPageState extends State<CollectionListPage> {
sortKey = localSettings.albumSortKey();
albumViewType = localSettings.albumViewType();
albumSortDirection = localSettings.albumSortDirection();
+ _scrollController = ScrollController(
+ initialScrollOffset: widget.initialScrollOffset ?? 0,
+ );
}
@override
void dispose() {
_collectionUpdatesSubscription.cancel();
+ _scrollController.dispose();
super.dispose();
}
@@ -85,41 +90,43 @@ class _CollectionListPageState extends State<CollectionListPage> {
child: Stack(
alignment: Alignment.bottomCenter,
children: [
- CustomScrollView(
- physics: const BouncingScrollPhysics(),
- controller: ScrollController(
- initialScrollOffset: widget.initialScrollOffset ?? 0,
+ Scrollbar(
+ interactive: true,
+ controller: _scrollController,
+ child: CustomScrollView(
+ physics: const BouncingScrollPhysics(),
+ controller: _scrollController,
+ slivers: [
+ SearchableAppBar(
+ title: widget.appTitle ?? const SizedBox.shrink(),
+ heroTag: widget.tag,
+ onSearch: (value) {
+ setState(() {
+ _searchQuery = value;
+ });
+ refreshCollections();
+ },
+ onSearchClosed: () {
+ setState(() {
+ _searchQuery = '';
+ });
+ refreshCollections();
+ },
+ actions: [
+ _sortMenu(collections!),
+ ],
+ ),
+ CollectionsFlexiGridViewWidget(
+ collections,
+ displayLimitCount: displayLimitCount,
+ tag: widget.tag,
+ enableSelectionMode: enableSelectionMode,
+ albumViewType: albumViewType ?? AlbumViewType.grid,
+ selectedAlbums: _selectedAlbum,
+ scrollBottomSafeArea: 140,
+ ),
+ ],
),
- slivers: [
- SearchableAppBar(
- title: widget.appTitle ?? const SizedBox.shrink(),
- heroTag: widget.tag,
- onSearch: (value) {
- setState(() {
- _searchQuery = value;
- });
- refreshCollections();
- },
- onSearchClosed: () {
- setState(() {
- _searchQuery = '';
- });
- refreshCollections();
- },
- actions: [
- _sortMenu(collections!),
- ],
- ),
- CollectionsFlexiGridViewWidget(
- collections,
- displayLimitCount: displayLimitCount,
- tag: widget.tag,
- enableSelectionMode: enableSelectionMode,
- albumViewType: albumViewType ?? AlbumViewType.grid,
- selectedAlbums: _selectedAlbum,
- scrollBottomSafeArea: 140,
- ),
- ],
),
AlbumSelectionOverlayBar(
_selectedAlbum,