Skip to content

Commit

Permalink
Fix KDB parcelable
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Jamet committed Apr 6, 2021
1 parent 59ead49 commit a10d1c9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ class EntryKDB : EntryVersioned<Int, UUID, GroupKDB, EntryKDB>, NodeKDBInterface
url = parcel.readString() ?: url
notes = parcel.readString() ?: notes
binaryDescription = parcel.readString() ?: binaryDescription
binaryDataId = parcel.readInt()
val rawBinaryDataId = parcel.readInt()
binaryDataId = if (rawBinaryDataId == -1) null else rawBinaryDataId
}

override fun readParentParcelable(parcel: Parcel): GroupKDB? {
Expand All @@ -109,9 +110,7 @@ class EntryKDB : EntryVersioned<Int, UUID, GroupKDB, EntryKDB>, NodeKDBInterface
dest.writeString(url)
dest.writeString(notes)
dest.writeString(binaryDescription)
binaryDataId?.let {
dest.writeInt(it)
}
dest.writeInt(binaryDataId ?: -1)
}

fun updateWith(source: EntryKDB) {
Expand Down

0 comments on commit a10d1c9

Please sign in to comment.