commit dbafd6de210706a3fc8eb533f179db6d612c2def
parent bb00569cf09f6eafee724cef9e68f7d9737c9140
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date:   Tue, 23 Jul 2024 12:33:20 +0200

fix(friend_mutation_observer): birthday month offset

Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>

Diffstat:
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/FriendMutationObserver.kt | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/FriendMutationObserver.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/FriendMutationObserver.kt @@ -112,14 +112,14 @@ class FriendMutationObserver: Feature("FriendMutationObserver") { } != friend.get("birthday")?.asString ) { val oldBirthday = databaseFriend.birthday.takeIf { it != 0L }?.let { - prettyPrintBirthday((it shr 32).toInt(), it.toInt()) + prettyPrintBirthday((it shr 32).toInt() - 1, it.toInt()) } if (!friend.has("birthday")) { sendWarnNotification(translation.format("birthday_removed", "username" to formatUsername(databaseFriend), "birthday" to oldBirthday.orEmpty())) } else { val newBirthday = friend.get("birthday")?.asString?.split("-")?.let { - prettyPrintBirthday(it[0].toInt(), it[1].toInt()) + prettyPrintBirthday(it[0].toInt() - 1, it[1].toInt()) } if (oldBirthday == null) { sendWarnNotification(translation.format("birthday_added", "username" to formatUsername(databaseFriend), "birthday" to newBirthday.orEmpty()))