From 74f3503413dc8ee0f56c190439fff20bdc08069e Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 13 Dec 2022 12:41:30 +0600 Subject: [PATCH] add fix todo --- .../timer/src/commonMain/kotlin/ButtonsBuilder.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt b/triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt index 67181a7..2b18123 100644 --- a/triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt +++ b/triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt @@ -3,6 +3,7 @@ package dev.inmo.plaguposter.triggers.timer import com.soywiz.klock.DateTime import com.soywiz.klock.DateTimeTz import com.soywiz.klock.Month +import com.soywiz.klock.Year import dev.inmo.plaguposter.common.SuccessfulSymbol import dev.inmo.plaguposter.posts.models.PostId import dev.inmo.tgbotapi.extensions.api.answers.answer @@ -116,7 +117,7 @@ object ButtonsBuilder { } } ) { newValue, oldDateTime -> - oldDateTime.copyDayOfMonth(hours = newValue) + oldDateTime.copyDayOfMonth(hours = newValue) // TODO::Fix issue in case of local and utc diff } buildStandardDataCallbackQuery( @@ -132,7 +133,7 @@ object ButtonsBuilder { } } ) { newValue, oldDateTime -> - oldDateTime.copyDayOfMonth(minutes = newValue) + oldDateTime.copyDayOfMonth(minutes = newValue) // TODO::Fix issue in case of local and utc diff } buildStandardDataCallbackQuery( @@ -148,7 +149,7 @@ object ButtonsBuilder { } } ) { newValue, oldDateTime -> - oldDateTime.copyDayOfMonth(dayOfMonth = newValue) + oldDateTime.copyDayOfMonth(dayOfMonth = newValue) // TODO::Fix issue in case of local and utc diff } buildStandardDataCallbackQuery( @@ -164,7 +165,7 @@ object ButtonsBuilder { } } ) { newValue, oldDateTime -> - oldDateTime.copyDayOfMonth(month = Month(newValue)) + oldDateTime.copyDayOfMonth(month = Month(newValue)) // TODO::Fix issue in case of local and utc diff } buildStandardDataCallbackQuery( @@ -173,7 +174,7 @@ object ButtonsBuilder { (it.year.year .. (it.year.year + 5)) } ) { newValue, oldDateTime -> - oldDateTime.copyDayOfMonth(month = Month(newValue)) + oldDateTime.copyDayOfMonth(year = Year(newValue)) // TODO::Fix issue in case of local and utc diff } } }