mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	refactor(mobile): reworked Asset, store all required fields from local & remote (#1539)
replace usage of AssetResponseDto with Asset Add new class ExifInfo to store data from ExifResponseDto
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							7bd2455175
						
					
				
				
					commit
					0048662182
				
			
							
								
								
									
										11
									
								
								mobile/lib/utils/builtin_extensions.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								mobile/lib/utils/builtin_extensions.dart
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
extension DurationExtension on String {
 | 
			
		||||
  Duration toDuration() {
 | 
			
		||||
    final parts =
 | 
			
		||||
        split(':').map((e) => double.parse(e).toInt()).toList(growable: false);
 | 
			
		||||
    return Duration(hours: parts[0], minutes: parts[1], seconds: parts[2]);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  double? toDouble() {
 | 
			
		||||
    return double.tryParse(this);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user