mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-28 03:48:37 +03:00
quick log improvents
This commit is contained in:
parent
8bb2f0584e
commit
2e71f38f00
2 changed files with 7 additions and 1 deletions
|
@ -90,6 +90,7 @@ import java.util.concurrent.ConcurrentHashMap
|
|||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import javax.inject.Inject
|
||||
import kotlin.math.max
|
||||
import kotlin.system.measureTimeMillis
|
||||
|
||||
/**
|
||||
* A `CryptoService` class instance manages the end-to-end crypto for a session.
|
||||
|
@ -542,7 +543,11 @@ internal class DefaultCryptoService @Inject constructor(
|
|||
val t0 = System.currentTimeMillis()
|
||||
Timber.tag(loggerTag.value).v("encryptEventContent() starts")
|
||||
runCatching {
|
||||
preshareRoomKey(roomId, userIds)
|
||||
measureTimeMillis {
|
||||
preshareRoomKey(roomId, userIds)
|
||||
}.also {
|
||||
Timber.d("Shared room key in room $roomId took $it ms")
|
||||
}
|
||||
val content = encrypt(roomId, eventType, eventContent)
|
||||
Timber.tag(loggerTag.value).v("## CRYPTO | encryptEventContent() : succeeds after ${System.currentTimeMillis() - t0} ms")
|
||||
MXEncryptEventContentResult(content, EventType.ENCRYPTED)
|
||||
|
|
|
@ -60,6 +60,7 @@ internal class DefaultSendEventTask @Inject constructor(
|
|||
eventType = event.type ?: ""
|
||||
)
|
||||
}
|
||||
Timber.d("Event sent to ${event.roomId} with event id ${response.eventId}")
|
||||
localEchoRepository.updateSendState(localId, params.event.roomId, SendState.SENT)
|
||||
return response.eventId.also {
|
||||
Timber.d("Event: $it just sent in ${params.event.roomId}")
|
||||
|
|
Loading…
Reference in a new issue