mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	Normalize progress bar value (#2967)
This commit is contained in:
		
							parent
							
								
									fb2cfcb640
								
							
						
					
					
						commit
						d078aea32b
					
				@ -1,4 +1,5 @@
 | 
			
		||||
import 'dart:io';
 | 
			
		||||
import 'dart:math';
 | 
			
		||||
import 'package:easy_localization/easy_localization.dart';
 | 
			
		||||
import 'package:auto_route/auto_route.dart';
 | 
			
		||||
import 'package:cached_network_image/cached_network_image.dart';
 | 
			
		||||
@ -310,9 +311,12 @@ class GalleryViewerPage extends HookConsumerWidget {
 | 
			
		||||
        child: Slider(
 | 
			
		||||
          value: playerValue.duration == Duration.zero
 | 
			
		||||
              ? 0.0
 | 
			
		||||
              : playerValue.position.inMicroseconds /
 | 
			
		||||
                  playerValue.duration.inMicroseconds *
 | 
			
		||||
              : min(
 | 
			
		||||
                  playerValue.position.inMicroseconds /
 | 
			
		||||
                      playerValue.duration.inMicroseconds *
 | 
			
		||||
                      100,
 | 
			
		||||
                  100,
 | 
			
		||||
                ),
 | 
			
		||||
          min: 0,
 | 
			
		||||
          max: 100,
 | 
			
		||||
          thumbColor: Colors.white,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user