code review
This commit is contained in:
parent
f83491fdfc
commit
75c1718252
|
@ -44,10 +44,8 @@ internal class EncryptEventWorker(context: Context, params: WorkerParameters)
|
||||||
val keepKeys: List<String>? = null
|
val keepKeys: List<String>? = null
|
||||||
) : SessionWorkerParams
|
) : SessionWorkerParams
|
||||||
|
|
||||||
@Inject
|
@Inject lateinit var crypto: CryptoService
|
||||||
lateinit var crypto: CryptoService
|
@Inject lateinit var localEchoUpdater: LocalEchoUpdater
|
||||||
@Inject
|
|
||||||
lateinit var localEchoUpdater: LocalEchoUpdater
|
|
||||||
|
|
||||||
override fun doWork(): Result {
|
override fun doWork(): Result {
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ object JsonCanonicalizer {
|
||||||
|
|
||||||
return result.toString()
|
return result.toString()
|
||||||
}
|
}
|
||||||
is String -> return JSONObject.quote(src.toString())
|
is String -> return JSONObject.quote(src)
|
||||||
else -> return src.toString()
|
else -> return src.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,8 @@ data class MessageActionState(
|
||||||
|
|
||||||
fun senderName(): String = informationData.memberName?.toString() ?: ""
|
fun senderName(): String = informationData.memberName?.toString() ?: ""
|
||||||
|
|
||||||
fun time(): String? = dateFormat.format(Date(timelineEvent?.root?.originServerTs ?: 0))
|
fun time(): String? = timelineEvent?.root?.originServerTs?.let { dateFormat.format(Date(it)) }
|
||||||
|
?: ""
|
||||||
|
|
||||||
fun canReact(): Boolean = timelineEvent?.root?.type == EventType.MESSAGE && timelineEvent.sendState.isSent()
|
fun canReact(): Boolean = timelineEvent?.root?.type == EventType.MESSAGE && timelineEvent.sendState.isSent()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue