mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-12 18:40:52 +00:00
adapt to java->kotlin changes regarding null-ability
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
15e875f974
commit
8e11f21233
@ -178,7 +178,7 @@ class MagicFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
} else if (deleteAll) {
|
} else if (deleteAll) {
|
||||||
cancelAllNotificationsForAccount(applicationContext, signatureVerification!!.userEntity)
|
cancelAllNotificationsForAccount(applicationContext, signatureVerification!!.userEntity)
|
||||||
} else if (deleteMultiple) {
|
} else if (deleteMultiple) {
|
||||||
notificationIds.forEach {
|
notificationIds!!.forEach {
|
||||||
cancelExistingNotificationWithId(
|
cancelExistingNotificationWithId(
|
||||||
applicationContext,
|
applicationContext,
|
||||||
signatureVerification!!.userEntity,
|
signatureVerification!!.userEntity,
|
||||||
|
@ -35,7 +35,7 @@ data class DecryptedPushMessage(
|
|||||||
var type: String?,
|
var type: String?,
|
||||||
|
|
||||||
@JsonField(name = ["subject"])
|
@JsonField(name = ["subject"])
|
||||||
var subject: String?,
|
var subject: String,
|
||||||
|
|
||||||
@JsonField(name = ["id"])
|
@JsonField(name = ["id"])
|
||||||
var id: String?,
|
var id: String?,
|
||||||
@ -62,10 +62,10 @@ data class DecryptedPushMessage(
|
|||||||
var text: String?,
|
var text: String?,
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
var timestamp: Long?
|
var timestamp: Long
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
constructor() : this(null, null, null, null, 0, null, false, false, false, null, null, 0)
|
constructor() : this(null, null, "", null, 0, null, false, false, false, null, null, 0)
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
@ -193,7 +193,7 @@ object NotificationUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun cancelExistingNotificationWithId(context: Context?, conversationUser: UserEntity, notificationId: Long) {
|
fun cancelExistingNotificationWithId(context: Context?, conversationUser: UserEntity, notificationId: Long?) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && conversationUser.id != -1L &&
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && conversationUser.id != -1L &&
|
||||||
context != null
|
context != null
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user