From e65357bc14aeb7aaf670cf594a289f26c4d5f73f Mon Sep 17 00:00:00 2001 From: Felix Wiemuth <533601+felixwiemuth@users.noreply.github.com> Date: Sun, 2 Oct 2022 12:14:10 +0200 Subject: [PATCH] Make `NotificationData` data class --- .../uhabits/core/ui/NotificationTray.kt | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/ui/NotificationTray.kt b/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/ui/NotificationTray.kt index 29a84e6e2..f1a0abc96 100644 --- a/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/ui/NotificationTray.kt +++ b/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/ui/NotificationTray.kt @@ -125,28 +125,10 @@ class NotificationTray @Inject constructor( } @Serializable - internal class NotificationData( + internal data class NotificationData( val timestamp: Timestamp, val reminderTime: Long, - ) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as NotificationData - - if (timestamp != other.timestamp) return false - if (reminderTime != other.reminderTime) return false - - return true - } - - override fun hashCode(): Int { - var result = timestamp.hashCode() - result = 31 * result + reminderTime.hashCode() - return result - } - } + ) private inner class ShowNotificationTask( private val habit: Habit,