Skip to content

Commit 3687944

Browse files
committed
Useless changes
1 parent 6daee20 commit 3687944

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

WordPress/src/main/java/org/wordpress/android/support/he/model/SupportMessage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ data class SupportMessage(
1111
val formattedText: AnnotatedString,
1212
val createdAt: Date,
1313
val authorName: String,
14-
val authorIsUser: Boolean,
14+
val authorIsUser: Boolean
1515
)

WordPress/src/main/java/org/wordpress/android/support/he/repository/HESupportRepository.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,23 +185,23 @@ class HESupportRepository @Inject constructor(
185185

186186
private fun uniffi.wp_api.SupportConversation.toSupportConversation(): SupportConversation =
187187
SupportConversation(
188-
id = id.toLong(),
189-
title = title,
190-
description = description,
191-
lastMessageSentAt = updatedAt,
192-
messages = messages.map { it.toSupportMessage() }
188+
id = this.id.toLong(),
189+
title = this.title,
190+
description = this.description,
191+
lastMessageSentAt = this.updatedAt,
192+
messages = this.messages.map { it.toSupportMessage() }
193193
)
194194

195195
private fun uniffi.wp_api.SupportMessage.toSupportMessage(): SupportMessage =
196196
SupportMessage(
197-
id = id.toLong(),
198-
rawText = content,
199-
formattedText = markdownToAnnotatedString(content),
200-
createdAt = createdAt,
201-
authorName = when (author) {
202-
is SupportMessageAuthor.User -> (author as SupportMessageAuthor.User).v1.displayName
203-
is SupportMessageAuthor.SupportAgent -> (author as SupportMessageAuthor.SupportAgent).v1.name
197+
id = this.id.toLong(),
198+
rawText = this.content,
199+
formattedText = markdownToAnnotatedString(this.content),
200+
createdAt = this.createdAt,
201+
authorName = when (this.author) {
202+
is SupportMessageAuthor.User -> (this.author as SupportMessageAuthor.User).v1.displayName
203+
is SupportMessageAuthor.SupportAgent -> (this.author as SupportMessageAuthor.SupportAgent).v1.name
204204
},
205-
authorIsUser = authorIsCurrentUser,
205+
authorIsUser = this.authorIsCurrentUser,
206206
)
207207
}

WordPress/src/main/java/org/wordpress/android/support/he/util/HEConversationUtils.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fun generateSampleHESupportConversations(): List<SupportConversation> {
2727
"the past few days."),
2828
createdAt = Date(oneHourAgo.time - 1800000),
2929
authorName = "You",
30-
authorIsUser = true,
30+
authorIsUser = true
3131
),
3232
SupportMessage(
3333
id = 2,
@@ -36,15 +36,15 @@ fun generateSampleHESupportConversations(): List<SupportConversation> {
3636
"Can you share your site URL?"),
3737
createdAt = Date(oneHourAgo.time - 900000),
3838
authorName = "Support Agent",
39-
authorIsUser = false,
39+
authorIsUser = false
4040
),
4141
SupportMessage(
4242
id = 3,
4343
rawText = "",
4444
formattedText = AnnotatedString("Sure, it's example.wordpress.com"),
4545
createdAt = oneHourAgo,
4646
authorName = "You",
47-
authorIsUser = true,
47+
authorIsUser = true
4848
)
4949
)
5050
),
@@ -62,15 +62,15 @@ fun generateSampleHESupportConversations(): List<SupportConversation> {
6262
formattedText = AnnotatedString("I'm trying to install a new plugin but getting an error."),
6363
createdAt = Date(twoDaysAgo.time - 3600000),
6464
authorName = "You",
65-
authorIsUser = true,
65+
authorIsUser = true
6666
),
6767
SupportMessage(
6868
id = 5,
6969
rawText = "",
7070
formattedText = AnnotatedString("I can help with that! What's the error message you're seeing?"),
7171
createdAt = twoDaysAgo,
7272
authorName = "Support Agent",
73-
authorIsUser = false,
73+
authorIsUser = false
7474
)
7575
)
7676
),
@@ -88,7 +88,7 @@ fun generateSampleHESupportConversations(): List<SupportConversation> {
8888
formattedText = AnnotatedString("I need help setting up my custom domain."),
8989
createdAt = oneWeekAgo,
9090
authorName = "You",
91-
authorIsUser = true,
91+
authorIsUser = true
9292
)
9393
)
9494
)

WordPress/src/test/java/org/wordpress/android/support/he/repository/HESupportRepositoryTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,6 @@ class HESupportRepositoryTest : BaseUnitTest() {
372372
is SupportMessageAuthor.User -> (this.author as SupportMessageAuthor.User).v1.displayName
373373
is SupportMessageAuthor.SupportAgent -> (this.author as SupportMessageAuthor.SupportAgent).v1.name
374374
},
375-
authorIsUser = this.author is SupportMessageAuthor.User,
375+
authorIsUser = this.author is SupportMessageAuthor.User
376376
)
377377
}

WordPress/src/test/java/org/wordpress/android/support/he/ui/HESupportViewModelTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ class HESupportViewModelTest : BaseUnitTest() {
694694
formattedText = AnnotatedString(text),
695695
createdAt = Date(),
696696
authorName = if (authorIsUser) "User" else "Support",
697-
authorIsUser = authorIsUser,
697+
authorIsUser = authorIsUser
698698
)
699699
}
700700
}

0 commit comments

Comments
 (0)