Updated on 2026-08-14
This commit is contained in:
parent
01c539a111
commit
315ff5aa6f
11 changed files with 42 additions and 39 deletions
|
|
@ -54,8 +54,8 @@ class PushNotificationDelegate(private val context: Context) {
|
|||
.setContentIntent(pendingIntent)
|
||||
.setVibrate(vibratePattern)
|
||||
.apply {
|
||||
imageUrl?.let { uri ->
|
||||
val bitmap = getBitmapImageFromUrl(uri)
|
||||
if (imageUrl != null) {
|
||||
val bitmap = getBitmapImageFromUrl(imageUrl)
|
||||
setStyle(
|
||||
NotificationCompat
|
||||
.BigPictureStyle()
|
||||
|
|
@ -64,7 +64,10 @@ class PushNotificationDelegate(private val context: Context) {
|
|||
}
|
||||
}
|
||||
|
||||
val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
val service = context.getSystemService(Context.NOTIFICATION_SERVICE)
|
||||
val notificationManager = requireNotNull(service as? NotificationManager) {
|
||||
"NotificationManager not available"
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
val notificationChannel = NotificationChannel(
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.tangem.tap.features.welcome.redux.WelcomeReducer
|
|||
import com.tangem.tap.proxy.redux.DaggerGraphReducer
|
||||
import org.rekotlin.Action
|
||||
|
||||
@Suppress("CanBeNonNullable")
|
||||
fun appReducer(action: Action, state: AppState?): AppState {
|
||||
requireNotNull(state)
|
||||
if (action is AppAction.RestoreState) return action.state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue