mirror of
				https://github.com/SimpleMobileTools/Simple-Gallery.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	use glide rotate transformation only when needed
This commit is contained in:
		@@ -28,9 +28,12 @@ class GlideDecoder : ImageDecoder {
 | 
			
		||||
                .signature(uri.path.getFileSignature())
 | 
			
		||||
                .format(DecodeFormat.PREFER_ARGB_8888)
 | 
			
		||||
                .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
 | 
			
		||||
                .transform(GlideRotateTransformation(context, getRotationDegrees(orientation)))
 | 
			
		||||
                .override(targetWidth, targetHeight)
 | 
			
		||||
 | 
			
		||||
        val degrees = getRotationDegrees(orientation)
 | 
			
		||||
        if (degrees != 0f)
 | 
			
		||||
            options.transform(GlideRotateTransformation(context, getRotationDegrees(orientation)))
 | 
			
		||||
 | 
			
		||||
        val drawable = Glide.with(context)
 | 
			
		||||
                .load(uri)
 | 
			
		||||
                .apply(options)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user