Browse Source

Fix formatting issues.

pull/2967/head
Benoit Marty 4 months ago
parent
commit
acefbbc7d8
  1. 4
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotificationBroadcastReceiverHandler.kt
  2. 3
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/ReplyMessageExtractor.kt
  3. 1
      libraries/push/test/src/main/kotlin/io/element/android/libraries/push/test/notifications/FakeNotificationDrawerManager.kt

4
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotificationBroadcastReceiverHandler.kt

@ -153,8 +153,8 @@ class NotificationBroadcastReceiverHandler @Inject constructor(
senderId = sessionId, senderId = sessionId,
noisy = false, noisy = false,
timestamp = systemClock.epochMillis(), timestamp = systemClock.epochMillis(),
senderDisambiguatedDisplayName = room.getUpdatedMember(sessionId) senderDisambiguatedDisplayName = room.getUpdatedMember(sessionId).getOrNull()
.getOrNull()?.disambiguatedDisplayName ?.disambiguatedDisplayName
?: stringProvider.getString(R.string.notification_sender_me), ?: stringProvider.getString(R.string.notification_sender_me),
body = message, body = message,
imageUriString = null, imageUriString = null,

3
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/ReplyMessageExtractor.kt

@ -30,6 +30,7 @@ interface ReplyMessageExtractor {
class AndroidReplyMessageExtractor @Inject constructor() : ReplyMessageExtractor { class AndroidReplyMessageExtractor @Inject constructor() : ReplyMessageExtractor {
override fun getReplyMessage(intent: Intent): String? { override fun getReplyMessage(intent: Intent): String? {
return RemoteInput.getResultsFromIntent(intent) return RemoteInput.getResultsFromIntent(intent)
?.getCharSequence(NotificationBroadcastReceiver.KEY_TEXT_REPLY)?.toString() ?.getCharSequence(NotificationBroadcastReceiver.KEY_TEXT_REPLY)
?.toString()
} }
} }

1
libraries/push/test/src/main/kotlin/io/element/android/libraries/push/test/notifications/FakeNotificationDrawerManager.kt

@ -29,7 +29,6 @@ class FakeNotificationDrawerManager(
private val clearMembershipNotificationForSessionLambda: (SessionId) -> Unit = { lambdaError() }, private val clearMembershipNotificationForSessionLambda: (SessionId) -> Unit = { lambdaError() },
private val clearMembershipNotificationForRoomLambda: (SessionId, RoomId) -> Unit = { _, _ -> lambdaError() } private val clearMembershipNotificationForRoomLambda: (SessionId, RoomId) -> Unit = { _, _ -> lambdaError() }
) : NotificationDrawerManager { ) : NotificationDrawerManager {
override fun clearAllMessagesEvents(sessionId: SessionId) { override fun clearAllMessagesEvents(sessionId: SessionId) {
clearAllMessagesEventsLambda(sessionId) clearAllMessagesEventsLambda(sessionId)
} }

Loading…
Cancel
Save