We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4ada7f commit 348a79fCopy full SHA for 348a79f
1 file changed
app/src/main/java/org/schabi/newpipe/util/image/CoilHelper.kt
@@ -67,16 +67,13 @@ object CoilHelper {
67
var newHeight = input.height / (input.width / notificationThumbnailWidth)
68
val result = input.scale(notificationThumbnailWidth, newHeight)
69
70
- if (result == input || !result.isMutable) {
+ return if (result == input || !result.isMutable) {
71
// create a new mutable bitmap to prevent strange crashes on some
72
// devices (see #4638)
73
newHeight = input.height / (input.width / (notificationThumbnailWidth - 1))
74
- val copied = input.scale(notificationThumbnailWidth, newHeight)
75
- input.recycle()
76
- return copied
+ input.scale(notificationThumbnailWidth, newHeight)
77
} else {
78
79
- return result
+ result
80
}
81
82
})
0 commit comments