aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-06-05 02:04:20 +0200
committerGitHub <noreply@github.com>2024-06-05 10:04:20 +1000
commit04ffd76ac87194fa6828b18d9c2f2e8ef04c6b70 (patch)
tree0ae4410b19722cc8387f47d56985fb0532f2bc69 /src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt
parentefcebe42a9cc2ed20ec78c2114c69d7abdc59380 (diff)
downloadskyhanni-04ffd76ac87194fa6828b18d9c2f2e8ef04c6b70.tar.gz
skyhanni-04ffd76ac87194fa6828b18d9c2f2e8ef04c6b70.tar.bz2
skyhanni-04ffd76ac87194fa6828b18d9c2f2e8ef04c6b70.zip
Add SimpleTimeMark into CachedItemData (#2006)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt b/src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt
index ca9f11cc6..663281ed1 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt
@@ -16,8 +16,7 @@ data class CachedItemData(
// null = not loaded
var riftExportable: Boolean? = null,
- // null = not loaded
- var itemRarityLastCheck: Long = 0L, // Can't use SimpleTimeMark here
+ var itemRarityLastCheck: SimpleTimeMark = SimpleTimeMark.farPast(),
// null = not loaded
var itemRarity: LorenzRarity? = null,
@@ -26,5 +25,12 @@ data class CachedItemData(
var lastInternalName: NEUInternalName? = null,
- var lastInternalNameFetchTime: Long = 0L, // Still can't use SimpleTimeMark here
-)
+ var lastInternalNameFetchTime: SimpleTimeMark = SimpleTimeMark.farPast(),
+) {
+ /**
+ * Delegate constructor to avoid calling a function with default arguments from java.
+ * We can't call the generated no args constructors (or rather we cannot generate that constructor), because inline
+ * classes are not part of the java-kotlin ABI that is super well supported (especially with default arguments).
+ */
+ constructor(void: Void?) : this()
+}