Loading legacy/core/src/main/java/com/fsck/k9/Account.kt +9 −3 Original line number Diff line number Diff line Loading @@ -9,10 +9,16 @@ import com.fsck.k9.mail.ServerSettings import java.util.Calendar import java.util.Date // This needs to be in sync with K9.DEFAULT_VISIBLE_LIMIT const val DEFAULT_VISIBLE_LIMIT = 25 /** * Account stores all of the settings for a single account defined by the user. Each account is defined by a UUID. */ class Account(override val uuid: String) : BaseAccount { class Account( override val uuid: String, private val isSensitiveDebugLoggingEnabled: () -> Boolean = { false }, ) : BaseAccount { @get:Synchronized @set:Synchronized var deletePolicy = DeletePolicy.NEVER Loading Loading @@ -71,7 +77,7 @@ class Account(override val uuid: String) : BaseAccount { var displayCount = 0 set(value) { if (field != value) { field = value.takeIf { it != -1 } ?: K9.DEFAULT_VISIBLE_LIMIT field = value.takeIf { it != -1 } ?: DEFAULT_VISIBLE_LIMIT isChangedVisibleLimits = true } } Loading Loading @@ -587,7 +593,7 @@ class Account(override val uuid: String) : BaseAccount { } override fun toString(): String { return if (K9.isSensitiveDebugLoggingEnabled) displayName else uuid return if (isSensitiveDebugLoggingEnabled()) displayName else uuid } override fun equals(other: Any?): Boolean { Loading legacy/core/src/main/java/com/fsck/k9/Preferences.kt +2 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ class Preferences internal constructor( val accountUuids = storage.getString("accountUuids", null) if (!accountUuids.isNullOrEmpty()) { accountUuids.split(",").forEach { uuid -> val newAccount = Account(uuid) val newAccount = Account(uuid, K9::isSensitiveDebugLoggingEnabled) accountPreferenceSerializer.loadAccount(newAccount, storage) accounts[uuid] = newAccount Loading Loading @@ -172,7 +172,7 @@ class Preferences internal constructor( } fun newAccount(accountUuid: String): Account { val account = Account(accountUuid) val account = Account(accountUuid, K9::isSensitiveDebugLoggingEnabled) accountPreferenceSerializer.loadDefaults(account) synchronized(accountLock) { Loading Loading
legacy/core/src/main/java/com/fsck/k9/Account.kt +9 −3 Original line number Diff line number Diff line Loading @@ -9,10 +9,16 @@ import com.fsck.k9.mail.ServerSettings import java.util.Calendar import java.util.Date // This needs to be in sync with K9.DEFAULT_VISIBLE_LIMIT const val DEFAULT_VISIBLE_LIMIT = 25 /** * Account stores all of the settings for a single account defined by the user. Each account is defined by a UUID. */ class Account(override val uuid: String) : BaseAccount { class Account( override val uuid: String, private val isSensitiveDebugLoggingEnabled: () -> Boolean = { false }, ) : BaseAccount { @get:Synchronized @set:Synchronized var deletePolicy = DeletePolicy.NEVER Loading Loading @@ -71,7 +77,7 @@ class Account(override val uuid: String) : BaseAccount { var displayCount = 0 set(value) { if (field != value) { field = value.takeIf { it != -1 } ?: K9.DEFAULT_VISIBLE_LIMIT field = value.takeIf { it != -1 } ?: DEFAULT_VISIBLE_LIMIT isChangedVisibleLimits = true } } Loading Loading @@ -587,7 +593,7 @@ class Account(override val uuid: String) : BaseAccount { } override fun toString(): String { return if (K9.isSensitiveDebugLoggingEnabled) displayName else uuid return if (isSensitiveDebugLoggingEnabled()) displayName else uuid } override fun equals(other: Any?): Boolean { Loading
legacy/core/src/main/java/com/fsck/k9/Preferences.kt +2 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ class Preferences internal constructor( val accountUuids = storage.getString("accountUuids", null) if (!accountUuids.isNullOrEmpty()) { accountUuids.split(",").forEach { uuid -> val newAccount = Account(uuid) val newAccount = Account(uuid, K9::isSensitiveDebugLoggingEnabled) accountPreferenceSerializer.loadAccount(newAccount, storage) accounts[uuid] = newAccount Loading Loading @@ -172,7 +172,7 @@ class Preferences internal constructor( } fun newAccount(accountUuid: String): Account { val account = Account(accountUuid) val account = Account(accountUuid, K9::isSensitiveDebugLoggingEnabled) accountPreferenceSerializer.loadDefaults(account) synchronized(accountLock) { Loading