mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-30 14:52:59 +00:00 
			
		
		
		
	Improve code style
This commit is contained in:
		| @@ -19,8 +19,10 @@ public abstract class PlayQueueItemTouchCallback extends ItemTouchHelper.SimpleC | ||||
|  | ||||
|     @Override | ||||
|     public int interpolateOutOfBoundsScroll(@NonNull final RecyclerView recyclerView, | ||||
|                                             final int viewSize, final int viewSizeOutOfBounds, | ||||
|                                             final int totalSize, final long msSinceStartScroll) { | ||||
|                                             final int viewSize, | ||||
|                                             final int viewSizeOutOfBounds, | ||||
|                                             final int totalSize, | ||||
|                                             final long msSinceStartScroll) { | ||||
|         final int standardSpeed = super.interpolateOutOfBoundsScroll(recyclerView, viewSize, | ||||
|                 viewSizeOutOfBounds, totalSize, msSinceStartScroll); | ||||
|         final int clampedAbsVelocity = MathUtils.clamp(Math.abs(standardSpeed), | ||||
|   | ||||
| @@ -80,10 +80,12 @@ public final class SeekbarPreviewThumbnailHelper { | ||||
|         // Resize original bitmap | ||||
|         try { | ||||
|             final int srcWidth = srcBitmap.getWidth() > 0 ? srcBitmap.getWidth() : 1; | ||||
|             final int newWidth = MathUtils.clamp( | ||||
|                     // Use 1/4 of the width for the preview | ||||
|             final int newWidth = MathUtils.clamp(Math.round(baseViewWidthSupplier.getAsInt() / 4f), | ||||
|                     Math.round(baseViewWidthSupplier.getAsInt() / 4f), | ||||
|                     // But have a min width of 10dp | ||||
|                     DeviceUtils.dpToPx(10, context), | ||||
|                     // Scaling more than that factor looks really pixelated -> max | ||||
|                     // And scaling more than that factor looks really pixelated -> max | ||||
|                     Math.round(srcWidth * 2.5f)); | ||||
|  | ||||
|             final float scaleFactor = (float) newWidth / srcWidth; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stypox
					Stypox