Remove logs in UpdateMessageBuilder

This commit is contained in:
Andrew 2024-02-28 14:25:05 +10:30
parent 22460df15e
commit 76f8e9867b

View File

@ -18,8 +18,6 @@ import org.session.libsession.utilities.recipients.Recipient
import org.session.libsession.utilities.truncateIdForDisplay import org.session.libsession.utilities.truncateIdForDisplay
object UpdateMessageBuilder { object UpdateMessageBuilder {
private val TAG = "UpdateMessageBuilder"
val storage = MessagingModuleConfiguration.shared.storage val storage = MessagingModuleConfiguration.shared.storage
private fun getSenderName(senderId: String) = storage.getContactWithSessionID(senderId) private fun getSenderName(senderId: String) = storage.getContactWithSessionID(senderId)
@ -88,8 +86,6 @@ object UpdateMessageBuilder {
timestamp: Long, timestamp: Long,
expireStarted: Long expireStarted: Long
): String { ): String {
Log.d(TAG, "buildExpirationTimerMessage() called with: duration = $duration, senderId = $senderId, isOutgoing = $isOutgoing, timestamp = $timestamp, expireStarted = $expireStarted")
if (!isOutgoing && senderId == null) return "" if (!isOutgoing && senderId == null) return ""
val senderName = if (isOutgoing) context.getString(R.string.MessageRecord_you) else getSenderName(senderId!!) val senderName = if (isOutgoing) context.getString(R.string.MessageRecord_you) else getSenderName(senderId!!)
return if (duration <= 0) { return if (duration <= 0) {
@ -103,7 +99,6 @@ object UpdateMessageBuilder {
} else { } else {
val time = ExpirationUtil.getExpirationDisplayValue(context, duration.toInt()) val time = ExpirationUtil.getExpirationDisplayValue(context, duration.toInt())
val action = context.getExpirationTypeDisplayValue(timestamp == expireStarted) val action = context.getExpirationTypeDisplayValue(timestamp == expireStarted)
Log.d(TAG, "action = $action because timestamp = $timestamp and expireStarted = $expireStarted equal = ${timestamp == expireStarted}")
if (isOutgoing) { if (isOutgoing) {
if (!isNewConfigEnabled) context.getString(R.string.MessageRecord_you_set_disappearing_message_time_to_s, time) if (!isNewConfigEnabled) context.getString(R.string.MessageRecord_you_set_disappearing_message_time_to_s, time)
else context.getString( else context.getString(
@ -120,7 +115,7 @@ object UpdateMessageBuilder {
action action
) )
} }
}.also { Log.d(TAG, "display: $it") } }
} }
fun buildDataExtractionMessage(context: Context, kind: DataExtractionNotificationInfoMessage.Kind, senderId: String? = null): String { fun buildDataExtractionMessage(context: Context, kind: DataExtractionNotificationInfoMessage.Kind, senderId: String? = null): String {