fix(mobile): set scrolling state only if changed (#3034)

* fix(mobile): set scrolling state only if changed

* fix: generate api

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Fynn Petersen-Frey 2023-06-29 21:35:29 +02:00 committed by GitHub
parent e3557fd80e
commit ff26d3666e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 40 additions and 34 deletions

View file

@ -311,7 +311,13 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
Widget _buildAssetGrid() {
final useDragScrolling = widget.renderList.totalAssets >= 20;
void dragScrolling(bool active) => _scrolling = active;
void dragScrolling(bool active) {
if (active != _scrolling) {
setState(() {
_scrolling = active;
});
}
}
final listWidget = ScrollablePositionedList.builder(
padding: const EdgeInsets.only(