From dd50cb01b43f45a126d566c6146388d4a4e62d5f Mon Sep 17 00:00:00 2001 From: Gideon Okuro Date: Wed, 24 Jul 2024 16:12:02 +0300 Subject: [PATCH] add more logs --- .../planet/myplanet/service/TransactionSyncManager.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/ole/planet/myplanet/service/TransactionSyncManager.kt b/app/src/main/java/org/ole/planet/myplanet/service/TransactionSyncManager.kt index 5bea10567e..5266673a0e 100644 --- a/app/src/main/java/org/ole/planet/myplanet/service/TransactionSyncManager.kt +++ b/app/src/main/java/org/ole/planet/myplanet/service/TransactionSyncManager.kt @@ -117,8 +117,14 @@ object TransactionSyncManager { mRealm.executeTransactionAsync({ realm: Realm -> val userModel = realm.where(RealmUserModel::class.java).equalTo("id", id).findFirst() syncHealthData(userModel, header) - }, { listener.onSyncComplete() }) { error: Throwable -> - error.message?.let { listener.onSyncFailed(it) } + }, { + listener.onSyncComplete() + val end = System.currentTimeMillis() + logDuration(start, end, "syncKeyIv") + }) { error: Throwable -> + error.message?.let { + listener.onSyncFailed(it) + } } }