mirror of
https://github.com/immich-app/immich.git
synced 2025-01-12 15:32:36 +02:00
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:
parent
e3557fd80e
commit
ff26d3666e
@ -311,7 +311,13 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
|
|||||||
Widget _buildAssetGrid() {
|
Widget _buildAssetGrid() {
|
||||||
final useDragScrolling = widget.renderList.totalAssets >= 20;
|
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(
|
final listWidget = ScrollablePositionedList.builder(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
|
BIN
mobile/openapi/lib/model/admin_signup_response_dto.dart
generated
BIN
mobile/openapi/lib/model/admin_signup_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/album_response_dto.dart
generated
BIN
mobile/openapi/lib/model/album_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/api_key_response_dto.dart
generated
BIN
mobile/openapi/lib/model/api_key_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/asset_response_dto.dart
generated
BIN
mobile/openapi/lib/model/asset_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/exif_response_dto.dart
generated
BIN
mobile/openapi/lib/model/exif_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/import_asset_dto.dart
generated
BIN
mobile/openapi/lib/model/import_asset_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/shared_link_create_dto.dart
generated
BIN
mobile/openapi/lib/model/shared_link_create_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/shared_link_edit_dto.dart
generated
BIN
mobile/openapi/lib/model/shared_link_edit_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/shared_link_response_dto.dart
generated
BIN
mobile/openapi/lib/model/shared_link_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/user_response_dto.dart
generated
BIN
mobile/openapi/lib/model/user_response_dto.dart
generated
Binary file not shown.
@ -66,7 +66,7 @@ class {{{classname}}} {
|
|||||||
{{/isNullable}}
|
{{/isNullable}}
|
||||||
{{#isDateTime}}
|
{{#isDateTime}}
|
||||||
{{#pattern}}
|
{{#pattern}}
|
||||||
json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}'
|
json[r'{{{baseName}}}'] = _isEpochMarker(r'{{{pattern}}}')
|
||||||
? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch
|
? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch
|
||||||
: this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String();
|
: this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String();
|
||||||
{{/pattern}}
|
{{/pattern}}
|
||||||
@ -76,7 +76,7 @@ class {{{classname}}} {
|
|||||||
{{/isDateTime}}
|
{{/isDateTime}}
|
||||||
{{#isDate}}
|
{{#isDate}}
|
||||||
{{#pattern}}
|
{{#pattern}}
|
||||||
json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}'
|
json[r'{{{baseName}}}'] = _isEpochMarker(r'{{{pattern}}}')
|
||||||
? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch
|
? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch
|
||||||
: _dateFormatter.format(this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc());
|
: _dateFormatter.format(this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc());
|
||||||
{{/pattern}}
|
{{/pattern}}
|
||||||
@ -117,10 +117,10 @@ class {{{classname}}} {
|
|||||||
return {{{classname}}}(
|
return {{{classname}}}(
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{#isDateTime}}
|
{{#isDateTime}}
|
||||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||||
{{/isDateTime}}
|
{{/isDateTime}}
|
||||||
{{#isDate}}
|
{{#isDate}}
|
||||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||||
{{/isDate}}
|
{{/isDate}}
|
||||||
{{^isDateTime}}
|
{{^isDateTime}}
|
||||||
{{^isDate}}
|
{{^isDate}}
|
||||||
@ -200,9 +200,9 @@ class {{{classname}}} {
|
|||||||
{{/isMap}}
|
{{/isMap}}
|
||||||
{{^isMap}}
|
{{^isMap}}
|
||||||
{{#isNumber}}
|
{{#isNumber}}
|
||||||
{{{name}}}: json[r'{{{baseName}}}'] == null
|
{{{name}}}: {{#isNullable}}json[r'{{{baseName}}}'] == null
|
||||||
? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}
|
? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}
|
||||||
: {{{datatypeWithEnum}}}.parse(json[r'{{{baseName}}}'].toString()),
|
: {{/isNullable}}{{{datatypeWithEnum}}}.parse('${json[r'{{{baseName}}}']}'),
|
||||||
{{/isNumber}}
|
{{/isNumber}}
|
||||||
{{^isNumber}}
|
{{^isNumber}}
|
||||||
{{^isEnum}}
|
{{^isEnum}}
|
||||||
|
Loading…
Reference in New Issue
Block a user