diff --git a/lib/scripts/image_anim.patch b/lib/scripts/image_anim.patch new file mode 100644 index 000000000..a60005d0b --- /dev/null +++ b/lib/scripts/image_anim.patch @@ -0,0 +1,13 @@ +diff --git a/packages/flutter/lib/src/widgets/image.dart b/packages/flutter/lib/src/widgets/image.dart +index 30429ea5e02..b58f4343440 100644 +--- a/packages/flutter/lib/src/widgets/image.dart ++++ b/packages/flutter/lib/src/widgets/image.dart +@@ -1148,7 +1148,7 @@ class _ImageState extends State with WidgetsBindingObserver { + _updateInvertColors(); + _resolveImage(); + +- _isPaused = !TickerMode.of(context) || (MediaQuery.maybeDisableAnimationsOf(context) ?? false); ++ _isPaused = !TickerMode.of(context); + + if (_isPaused && _frameNumber != null) { + _stopListeningToStream(keepStreamAlive: true); diff --git a/lib/scripts/patch.ps1 b/lib/scripts/patch.ps1 index 957529afb..23a35fb66 100644 --- a/lib/scripts/patch.ps1 +++ b/lib/scripts/patch.ps1 @@ -22,6 +22,9 @@ $TextSelectionPatch = "lib/scripts/text_selection.patch" $NavigatorPatch = "lib/scripts/navigator.patch" +# https://github.com/bggRGjQaUbCoE/PiliPlus/issues/2107 +$ImageAnimPatch = "lib/scripts/image_anim.patch" + # TODO: remove # https://github.com/flutter/flutter/issues/90223 $ModalBarrierPatch = "lib/scripts/modal_barrier.patch" @@ -41,7 +44,8 @@ Set-Location $env:FLUTTER_ROOT $picks = @() $reverts = @() -$patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch) +$patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch, + $ImageAnimPatch) switch ($platform.ToLower()) { "android" {