You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -59,32 +64,49 @@ data class UpdateEntity(var userId: String? = "",
59
64
//-----displayed inferred fields
60
65
var authorName:String?=null
61
66
get() {
62
-
if (author?.resolvedObject!=null) {
63
-
field = author?.resolvedObject!!["username"] asString
67
+
if (author !=null) {
68
+
field = author!![USERNAME_FIELD_NAME] asString?
64
69
}
65
70
returnif (field ==null) "--"else field
66
71
}
67
-
private set
72
+
set (value) {
73
+
if (author !=null) {
74
+
author!![USERNAME_FIELD_NAME] = value
75
+
}
76
+
}
68
77
69
78
var authorID:String?=null
70
79
get() {
71
-
if (author?.resolvedObject !=null) {
72
-
field = author?.resolvedObject!!["_id"] asString
73
-
}
80
+
field = author?.id
74
81
returnif (field ==null) ""else field
75
82
}
76
83
private set
77
84
78
85
var since:String?=null
79
86
get() {
80
-
val pp =ParsePosition(0)
81
-
val date =SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS", Locale.US).parse(meta?.entityCreationTime, pp)
82
-
field = getSince(date, Calendar.getInstance())
83
-
Timber.i("getting since -> ${field !=null}")
87
+
if (field ==null) {
88
+
val date = dateFormat?.parse(ect ?:"")
89
+
field =if (date !=null) getSince(date, Calendar.getInstance()) elsenull
90
+
Timber.i("getting since -> ${field !=null}")
91
+
}
84
92
return field
85
93
}
86
94
private set//close the output stream//Then decode from the output stream and get the image.//and there is an actual LinkedFile behind the Key//If it hasn't been resolved...
87
95
96
+
var ect:String?=null
97
+
get() {
98
+
if (field.isNullOrEmpty()) {
99
+
val kmd = get(KMD_FIELD_NAME)
100
+
field =if (kmd isMap<*, *>) {
101
+
val ect = kmd[Constants.ECT_FIELD_NAME]
102
+
ect?.toString() ?:""
103
+
} else {
104
+
null
105
+
}
106
+
}
107
+
return field
108
+
}
109
+
88
110
/**
89
111
* Get the thumbnail from the LinkedResource
90
112
*
@@ -114,8 +136,6 @@ data class UpdateEntity(var userId: String? = "",
0 commit comments