-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #664 from alexandrVakhtinTari/bugs/fixes_parceble_bug
fix: fixed yat parceble bugs
- Loading branch information
Showing
11 changed files
with
99 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 31 additions & 2 deletions
33
app/src/main/java/com/tari/android/wallet/ui/fragment/send/common/TransactionData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
package com.tari.android.wallet.ui.fragment.send.common | ||
|
||
import android.os.Parcel | ||
import android.os.Parcelable | ||
import com.tari.android.wallet.model.MicroTari | ||
import com.tari.android.wallet.model.User | ||
import java.io.Serializable | ||
|
||
data class TransactionData(val recipientUser: User?, val amount: MicroTari?, val note: String?) : Serializable | ||
data class TransactionData(val recipientUser: User?, val amount: MicroTari?, val note: String?) : Parcelable { | ||
|
||
constructor(parcel: Parcel) : this( | ||
parcel.readParcelable(User::class.java.classLoader), | ||
parcel.readParcelable(MicroTari::class.java.classLoader), | ||
parcel.readString() | ||
) { | ||
} | ||
|
||
override fun writeToParcel(parcel: Parcel, flags: Int) { | ||
parcel.writeParcelable(recipientUser, flags) | ||
parcel.writeParcelable(amount, flags) | ||
parcel.writeString(note) | ||
} | ||
|
||
override fun describeContents(): Int { | ||
return 0 | ||
} | ||
|
||
companion object CREATOR : Parcelable.Creator<TransactionData> { | ||
override fun createFromParcel(parcel: Parcel): TransactionData { | ||
return TransactionData(parcel) | ||
} | ||
|
||
override fun newArray(size: Int): Array<TransactionData?> { | ||
return arrayOfNulls(size) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters