removing this usages for project convention

This commit is contained in:
Adam Brown 2021-10-07 16:29:20 +01:00
parent 0d316e69de
commit 8fb6bef503
2 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ class NotificationFactory @Inject constructor(
) {
fun Map<String, List<NotifiableMessageEvent>>.toNotifications(myUserDisplayName: String, myUserAvatarUrl: String?): List<RoomNotification> {
return this.map { (roomId, events) ->
return map { (roomId, events) ->
when {
events.hasNoEventsToDisplay() -> RoomNotification.Removed(roomId)
else -> roomGroupMessageCreator.createRoomMessage(events, roomId, myUserDisplayName, myUserAvatarUrl)
@ -41,7 +41,7 @@ class NotificationFactory @Inject constructor(
private fun NotifiableMessageEvent.canNotBeDisplayed() = isRedacted
fun Map<String, InviteNotifiableEvent?>.toNotifications(myUserId: String): List<OneShotNotification> {
return this.map { (roomId, event) ->
return map { (roomId, event) ->
when (event) {
null -> OneShotNotification.Removed(key = roomId)
else -> OneShotNotification.Append(
@ -59,7 +59,7 @@ class NotificationFactory @Inject constructor(
@JvmName("toNotificationsSimpleNotifiableEvent")
fun Map<String, SimpleNotifiableEvent?>.toNotifications(myUserId: String): List<OneShotNotification> {
return this.map { (eventId, event) ->
return map { (eventId, event) ->
when (event) {
null -> OneShotNotification.Removed(key = eventId)
else -> OneShotNotification.Append(

View file

@ -170,4 +170,4 @@ class RoomGroupMessageCreator @Inject constructor(
}
}
private fun NotifiableMessageEvent.isSmartReplyError() = this.outGoingMessage && this.outGoingMessageFailed
private fun NotifiableMessageEvent.isSmartReplyError() = outGoingMessage && outGoingMessageFailed