Skip to content

armgit / ente

Public Imported from GitHub
0

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

Show altered progress bar on very big memories

laurenspriem05766617938d
diff --git a/mobile/apps/photos/lib/ui/home/memories/memory_progress_indicator.dart b/mobile/apps/photos/lib/ui/home/memories/memory_progress_indicator.dart
index 413f737e01..baf1f4d182 100644
--- a/mobile/apps/photos/lib/ui/home/memories/memory_progress_indicator.dart
+++ b/mobile/apps/photos/lib/ui/home/memories/memory_progress_indicator.dart
@@ -67,11 +67,24 @@ class _MemoryProgressIndicatorState extends State<MemoryProgressIndicator>
@override
Widget build(BuildContext context) {
- // For very large memories, hide the tick bar (it would render as pixel-thin
- // slivers). The animation controller keeps running so auto-advance still
- // fires via onComplete.
+ // For very large memories, a per-file tick bar would render as pixel-thin
+ // slivers. Show a single continuous bar instead, combining completed-file
+ // progress with the current file's in-flight animation.
if (widget.totalSteps >= kMemoryProgressTickCutoff) {
- return const SizedBox.shrink();
+ return AnimatedBuilder(
+ animation: _animation,
+ builder: (context, _) {
+ final progress =
+ (widget.currentIndex + _animation.value) / widget.totalSteps;
+ return LinearProgressIndicator(
+ value: progress.clamp(0.0, 1.0),
+ backgroundColor: widget.unselectedColor,
+ valueColor: AlwaysStoppedAnimation<Color>(widget.selectedColor),
+ minHeight: widget.height,
+ borderRadius: BorderRadius.circular(12),
+ );
+ },
+ );
}
return Row(
children: List.generate(widget.totalSteps, (index) {