fix(core): half swipe notifier notification

Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>
This commit is contained in:
rhunk 2025-02-05 22:43:23 +01:00
parent ec3dbd6964
commit 0016897bb3

View File

@ -9,7 +9,6 @@ import me.rhunk.snapenhance.core.features.Feature
import me.rhunk.snapenhance.core.util.hook.HookStage
import me.rhunk.snapenhance.core.util.hook.hook
import me.rhunk.snapenhance.core.util.hook.hookConstructor
import me.rhunk.snapenhance.core.util.ktx.getIdentifier
import me.rhunk.snapenhance.core.util.ktx.getObjectField
import me.rhunk.snapenhance.mapper.impl.CallbackMapper
import java.util.concurrent.ConcurrentHashMap
@ -19,7 +18,6 @@ class HalfSwipeNotifier : Feature("Half Swipe Notifier") {
private val peekingConversations = ConcurrentHashMap<String, List<String>>()
private val startPeekingTimestamps = ConcurrentHashMap<String, Long>()
private val svgEyeDrawable by lazy { context.resources.getIdentifier("svg_eye_24x24", "drawable") }
private val notificationManager get() = context.androidContext.getSystemService(NotificationManager::class.java)
private val translation by lazy { context.translation.getCategory("half_swipe_notifier")}
private val channelId by lazy {
@ -121,7 +119,7 @@ class HalfSwipeNotifier : Feature("Half Swipe Notifier") {
.setWhen(System.currentTimeMillis())
.setShowWhen(true)
.setAutoCancel(true)
.setSmallIcon(svgEyeDrawable)
.setSmallIcon(android.R.drawable.presence_invisible)
.build()
.let { notification ->
notificationManager.notify(System.nanoTime().toInt(), notification)