mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-13 20:48:56 +01:00
Revert "Require Android 8+"
This reverts commit 64c50c1283.
Forgot we need to manage app update checks manually...
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package eu.kanade.tachiyomi.data.coil
|
||||
|
||||
import android.os.Build
|
||||
import androidx.core.graphics.drawable.toDrawable
|
||||
import coil.ImageLoader
|
||||
import coil.decode.DecodeResult
|
||||
@@ -47,7 +48,8 @@ class TachiyomiImageDecoder(private val resources: ImageSource, private val opti
|
||||
ImageUtil.findImageType(it)
|
||||
}
|
||||
return when (type) {
|
||||
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL, ImageUtil.ImageType.HEIF -> true
|
||||
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL -> true
|
||||
ImageUtil.ImageType.HEIF -> Build.VERSION.SDK_INT < Build.VERSION_CODES.O
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import androidx.core.net.toUri
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.backup.BackupRestoreJob
|
||||
@@ -367,18 +368,20 @@ class NotificationReceiver : BroadcastReceiver() {
|
||||
|
||||
When programmatically dismissing this notification, the group notification is not automatically dismissed.
|
||||
*/
|
||||
val groupKey = context.notificationManager.activeNotifications.find {
|
||||
it.id == notificationId
|
||||
}?.groupKey
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
val groupKey = context.notificationManager.activeNotifications.find {
|
||||
it.id == notificationId
|
||||
}?.groupKey
|
||||
|
||||
if (groupId != null && groupId != 0 && !groupKey.isNullOrEmpty()) {
|
||||
val notifications = context.notificationManager.activeNotifications.filter {
|
||||
it.groupKey == groupKey
|
||||
}
|
||||
if (groupId != null && groupId != 0 && groupKey != null && groupKey.isNotEmpty()) {
|
||||
val notifications = context.notificationManager.activeNotifications.filter {
|
||||
it.groupKey == groupKey
|
||||
}
|
||||
|
||||
if (notifications.size == 2) {
|
||||
context.cancelNotification(groupId)
|
||||
return
|
||||
if (notifications.size == 2) {
|
||||
context.cancelNotification(groupId)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user