mirror of
https://github.com/danilkinkin/buckwheat.git
synced 2025-12-31 04:13:02 +00:00
fix: fixed calculate actual finish date in spendings calendar
This commit is contained in:
parent
87f2d93acf
commit
b90fd0aa46
2 changed files with 3 additions and 1 deletions
|
|
@ -158,6 +158,7 @@ fun Analytics(
|
|||
transactions = transactions,
|
||||
startDate = spendsViewModel.startPeriodDate.value!!,
|
||||
finishDate = spendsViewModel.finishPeriodDate.value!!,
|
||||
actualFinishDate = finishPeriodActualDate,
|
||||
currency = spendsViewModel.currency.value!!,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ fun SpendsCalendar(
|
|||
transactions: List<Transaction>,
|
||||
startDate: Date,
|
||||
finishDate: Date,
|
||||
actualFinishDate: Date? = null,
|
||||
currency: ExtendCurrency,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
|
@ -144,7 +145,7 @@ fun SpendsCalendar(
|
|||
CalendarState(
|
||||
context = context,
|
||||
disableBeforeDate = startDate,
|
||||
disableAfterDate = finishDate.coerceAtMost(Date()),
|
||||
disableAfterDate = (actualFinishDate ?: finishDate).coerceAtMost(Date()),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue