File tree Expand file tree Collapse file tree 1 file changed +1
-26
lines changed
library/src/main/java/com/owncloud/android/lib/resources/assistant/chat/model Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Original file line number Diff line number Diff line change 99package com.owncloud.android.lib.resources.assistant.chat.model
1010
1111import com.google.gson.annotations.SerializedName
12- import java.time.ZoneId
13- import java.time.format.DateTimeFormatter
14- import java.util.Locale
15- import kotlin.time.ExperimentalTime
16- import kotlin.time.Instant
17- import kotlin.time.toJavaInstant
1812
1913data class ChatMessage (
2014 val id : Long ,
@@ -27,23 +21,4 @@ data class ChatMessage(
2721 val ocpTaskId : Any? ,
2822 val sources : String ,
2923 val attachments : List <Any ?>
30- ) {
31- companion object {
32- private const val TIMESTAMP_PRESENTATION_TIME_PATTERN = " HH:mm"
33- }
34-
35- fun isHuman (): Boolean = role == " human"
36-
37- @OptIn(ExperimentalTime ::class )
38- fun timestampRepresentation (): String {
39- val instant = Instant .fromEpochSeconds(timestamp)
40- val deviceZone = ZoneId .systemDefault()
41-
42- val formatter =
43- DateTimeFormatter
44- .ofPattern(TIMESTAMP_PRESENTATION_TIME_PATTERN , Locale .getDefault())
45- .withZone(deviceZone)
46-
47- return formatter.format(instant.toJavaInstant())
48- }
49- }
24+ )
You can’t perform that action at this time.
0 commit comments