- Allow multiple linked accounts per service (YouTube, Twitch) - LinkedAccount PK changed from serviceId to backend UUID - StreamDestination now references linkedAccountId - Room DB migration v2→v3 for new schema - Unlink endpoint changed to DELETE by account ID - Accounts UI always shows "Add Account" for all providers - preparePlan matches destinations by ID instead of serviceId
40 lines
1.2 KiB
Kotlin
40 lines
1.2 KiB
Kotlin
package com.omixlab.lckcontrol.shared
|
|
|
|
import android.os.Parcel
|
|
import android.os.Parcelable
|
|
|
|
data class LinkedAccount(
|
|
val id: String,
|
|
val serviceId: String,
|
|
val displayName: String,
|
|
val accountId: String,
|
|
val avatarUrl: String? = null,
|
|
val isAuthenticated: Boolean = false,
|
|
) : Parcelable {
|
|
|
|
constructor(parcel: Parcel) : this(
|
|
id = parcel.readString()!!,
|
|
serviceId = parcel.readString()!!,
|
|
displayName = parcel.readString()!!,
|
|
accountId = parcel.readString()!!,
|
|
avatarUrl = parcel.readString(),
|
|
isAuthenticated = parcel.readInt() != 0,
|
|
)
|
|
|
|
override fun writeToParcel(parcel: Parcel, flags: Int) {
|
|
parcel.writeString(id)
|
|
parcel.writeString(serviceId)
|
|
parcel.writeString(displayName)
|
|
parcel.writeString(accountId)
|
|
parcel.writeString(avatarUrl)
|
|
parcel.writeInt(if (isAuthenticated) 1 else 0)
|
|
}
|
|
|
|
override fun describeContents(): Int = 0
|
|
|
|
companion object CREATOR : Parcelable.Creator<LinkedAccount> {
|
|
override fun createFromParcel(parcel: Parcel) = LinkedAccount(parcel)
|
|
override fun newArray(size: Int) = arrayOfNulls<LinkedAccount>(size)
|
|
}
|
|
}
|