mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-01 22:32:47 -08:00
fix: White custom color #2703
This commit is contained in:
6 files changed
+29
-11
No files matched your search
@@ -3,6 +3,7 @@
|
||||
* Fix custom icon selection exception ##2684
|
||||
* Fix database error display #2701
|
||||
* Fix remove Credit Card tag #2698
|
||||
* Fix white custom color #2703
|
||||
* Add ML-DSA 44, ML-DSA 65, and ML-DSA 87 passkeys algorithm #2695 #2696 (@cali-95)
|
||||
|
||||
KeePassDX(4.5.3)
|
||||
|
||||
@@ -24,8 +24,10 @@ import android.os.Parcelable
|
||||
import com.kunzisoft.keepass.database.element.Tags
|
||||
import com.kunzisoft.keepass.database.element.database.DatabaseVersioned
|
||||
import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||
import com.kunzisoft.keepass.utils.readIntCompat
|
||||
import com.kunzisoft.keepass.utils.readListCompat
|
||||
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||
import com.kunzisoft.keepass.utils.writeIntCompat
|
||||
import java.util.UUID
|
||||
|
||||
class Template : Parcelable {
|
||||
@@ -94,8 +96,8 @@ class Template : Parcelable {
|
||||
uuid = parcel.readParcelableCompat<ParcelUuid>()?.uuid ?: uuid
|
||||
title = parcel.readString() ?: title
|
||||
icon = parcel.readParcelableCompat() ?: icon
|
||||
backgroundColor = parcel.readInt()
|
||||
foregroundColor = parcel.readInt()
|
||||
backgroundColor = parcel.readIntCompat()
|
||||
foregroundColor = parcel.readIntCompat()
|
||||
tags = parcel.readParcelableCompat() ?: tags
|
||||
parcel.readListCompat(sections)
|
||||
}
|
||||
@@ -105,8 +107,8 @@ class Template : Parcelable {
|
||||
parcel.writeParcelable(ParcelUuid(uuid), flags)
|
||||
parcel.writeString(title)
|
||||
parcel.writeParcelable(icon, flags)
|
||||
parcel.writeInt(backgroundColor ?: -1)
|
||||
parcel.writeInt(foregroundColor ?: -1)
|
||||
parcel.writeIntCompat(backgroundColor)
|
||||
parcel.writeIntCompat(foregroundColor)
|
||||
parcel.writeParcelable(tags, flags)
|
||||
parcel.writeList(sections)
|
||||
}
|
||||
|
||||
@@ -40,9 +40,11 @@ import com.kunzisoft.keepass.otp.OtpEntryFields.isOTP
|
||||
import com.kunzisoft.keepass.otp.OtpEntryFields.setOtp
|
||||
import com.kunzisoft.keepass.utils.CharArrayUtil.clear
|
||||
import com.kunzisoft.keepass.utils.readCharArrayCompat
|
||||
import com.kunzisoft.keepass.utils.readIntCompat
|
||||
import com.kunzisoft.keepass.utils.readListCompat
|
||||
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||
import com.kunzisoft.keepass.utils.writeCharArrayCompat
|
||||
import com.kunzisoft.keepass.utils.writeIntCompat
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
@@ -104,10 +106,8 @@ open class EntryInfo : NodeInfo {
|
||||
password = parcel.readCharArrayCompat() ?: password
|
||||
url = parcel.readString() ?: url
|
||||
notes = parcel.readString() ?: notes
|
||||
val readBgColor = parcel.readInt()
|
||||
backgroundColor = if (readBgColor == -1) null else readBgColor
|
||||
val readFgColor = parcel.readInt()
|
||||
foregroundColor = if (readFgColor == -1) null else readFgColor
|
||||
backgroundColor = parcel.readIntCompat()
|
||||
foregroundColor = parcel.readIntCompat()
|
||||
parcel.readListCompat(customFields)
|
||||
parcel.readListCompat(attachments)
|
||||
autoType = parcel.readParcelableCompat() ?: autoType
|
||||
@@ -129,8 +129,8 @@ open class EntryInfo : NodeInfo {
|
||||
parcel.writeCharArrayCompat(password)
|
||||
parcel.writeString(url)
|
||||
parcel.writeString(notes)
|
||||
parcel.writeInt(backgroundColor ?: -1)
|
||||
parcel.writeInt(foregroundColor ?: -1)
|
||||
parcel.writeIntCompat(backgroundColor)
|
||||
parcel.writeIntCompat(foregroundColor)
|
||||
parcel.writeList(customFields)
|
||||
parcel.writeList(attachments)
|
||||
parcel.writeParcelable(autoType, flags)
|
||||
|
||||
@@ -282,4 +282,17 @@ fun <T : Enum<T>> Parcel.writeEnum(value: T?) =
|
||||
|
||||
fun Parcel.readBooleanCompat(): Boolean = readByte().toInt() != 0
|
||||
|
||||
fun Parcel.writeBooleanCompat(value: Boolean) = writeByte((if (value) 1 else 0).toByte())
|
||||
fun Parcel.writeBooleanCompat(value: Boolean) = writeByte((if (value) 1 else 0).toByte())
|
||||
|
||||
fun Parcel.writeIntCompat(value: Int?) {
|
||||
if (value != null) {
|
||||
writeBooleanCompat(true)
|
||||
writeInt(value)
|
||||
} else {
|
||||
writeBooleanCompat(false)
|
||||
}
|
||||
}
|
||||
|
||||
fun Parcel.readIntCompat(): Int? {
|
||||
return if (readBooleanCompat()) { readInt() } else null
|
||||
}
|
||||
@@ -2,4 +2,5 @@
|
||||
* Fix custom icon selection exception ##2684
|
||||
* Fix database error display #2701
|
||||
* Fix remove Credit Card tag #2698
|
||||
* Fix white custom color #2703
|
||||
* Add ML-DSA 44, ML-DSA 65, and ML-DSA 87 passkeys algorithm #2695 #2696 (@cali-95)
|
||||
@@ -2,4 +2,5 @@
|
||||
* Correction de l'exception lors de la sélection d'icône customisé ##2684
|
||||
* Correction de l'affichage des erreurs de bases de données #2701
|
||||
* Correction de la suppression du tag Credit Card #2698
|
||||
* Correction de la couleur customisée blanche #2703
|
||||
* Ajout des algorithmes de clés d'authentification ML-DSA 44, ML-DSA 65, and ML-DSA 87 #2695 #2696 (@cali-95)
|
||||
Reference in new issue
Block a user