mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Fix kotlin compiler warnings.
This commit is contained in:
committed by
Alex Hart
parent
8984b763fb
commit
3761859681
@@ -263,7 +263,7 @@ sealed class NotificationBuilder(protected val context: Context) {
|
||||
val personBuilder: PersonCompat.Builder = PersonCompat.Builder()
|
||||
.setBot(false)
|
||||
.setName(notificationItem.getPersonName(context))
|
||||
.setUri(notificationItem.getPersonUri(context))
|
||||
.setUri(notificationItem.getPersonUri())
|
||||
.setIcon(notificationItem.getPersonIcon(context).toIconCompat())
|
||||
|
||||
if (includeShortcut) {
|
||||
@@ -330,9 +330,7 @@ sealed class NotificationBuilder(protected val context: Context) {
|
||||
0
|
||||
)
|
||||
|
||||
val bubbleMetadata = NotificationCompat.BubbleMetadata.Builder()
|
||||
.setIntent(intent)
|
||||
.setIcon(AvatarUtil.getIconCompatForShortcut(context, conversation.recipient))
|
||||
val bubbleMetadata = NotificationCompat.BubbleMetadata.Builder(intent, AvatarUtil.getIconCompatForShortcut(context, conversation.recipient))
|
||||
.setAutoExpandBubble(bubbleState === BubbleUtil.BubbleState.SHOWN)
|
||||
.setDesiredHeight(600)
|
||||
.setSuppressNotification(bubbleState === BubbleUtil.BubbleState.SHOWN)
|
||||
|
||||
@@ -56,14 +56,6 @@ data class NotificationConversation(
|
||||
}
|
||||
}
|
||||
|
||||
fun getContactUri(context: Context): String? {
|
||||
return if (SignalStore.settings().messageNotificationsPrivacy.isDisplayContact) {
|
||||
recipient.contactUri?.toString()
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
fun getSlideBigPictureUri(context: Context): Uri? {
|
||||
return if (notificationItems.size == 1 && SignalStore.settings().messageNotificationsPrivacy.isDisplayMessage && !KeyCachingService.isLocked(context)) {
|
||||
mostRecentNotification.getBigPictureUri()
|
||||
|
||||
@@ -100,7 +100,7 @@ sealed class NotificationItemV2(val threadRecipient: Recipient, protected val re
|
||||
return timestamp.compareTo(other.timestamp)
|
||||
}
|
||||
|
||||
fun getPersonUri(context: Context): String? {
|
||||
fun getPersonUri(): String? {
|
||||
return if (SignalStore.settings().messageNotificationsPrivacy.isDisplayContact && individualRecipient.isSystemContact) {
|
||||
individualRecipient.contactUri.toString()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user