Skip to content

Commit

Permalink
Fixes #1613
Browse files Browse the repository at this point in the history
  • Loading branch information
mtotschnig committed Dec 21, 2024
1 parent ad7b44f commit 9c9a95d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class PlannerFragment : DialogViewBinding<PlannerFragmentBinding>() {
if (planInstance.sealed) {
warnSealed(templatesList)
true
} else onSelection(planInstance, position)
} else onSelection(planInstance, bindingAdapterPosition)
}
templatesList.configureOnClickPopup(root,
planInstance.let {
Expand All @@ -276,7 +276,7 @@ class PlannerFragment : DialogViewBinding<PlannerFragmentBinding>() {
warnSealed(templatesList)
return@configureOnClickPopup true
} else if (selectedInstances.size > 0) {
if (onSelection(planInstance, position))
if (onSelection(planInstance, bindingAdapterPosition))
return@configureOnClickPopup true
}
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ enum class PlanInstanceState {
}

@Parcelize
data class PlanInstance(val templateId: Long, val transactionId: Long?, val title: String, val date: Long, val color: Int, val amount: Money, val state: PlanInstanceState, val sealed: Boolean) : Parcelable {
data class PlanInstance(
val templateId: Long,
val transactionId: Long?,
val title: String,
val date: Long,
val color: Int,
val amount: Money,
val state: PlanInstanceState,
val sealed: Boolean,
) : Parcelable {
constructor(templateId: Long, instanceId: Long?, transactionId: Long?, title: String, date: Long, color: Int, amount: Money, sealed: Boolean) :
this(templateId, transactionId, title, date, color, amount,
when {
Expand Down

0 comments on commit 9c9a95d

Please sign in to comment.