From 857fa5e230606e6c19be39983652a4d64b0db2a1 Mon Sep 17 00:00:00 2001 From: Armand <4831c0@proton.me> Date: Wed, 16 Sep 2026 14:27:55 +0200 Subject: [PATCH] fix(api): derive lesson cache key from full uid hash --- kreta_api/lib/src/model/timetable.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kreta_api/lib/src/model/timetable.dart b/kreta_api/lib/src/model/timetable.dart index b20214f3..1584d6c8 100644 --- a/kreta_api/lib/src/model/timetable.dart +++ b/kreta_api/lib/src/model/timetable.dart @@ -63,6 +63,13 @@ class Lesson extends NameUid { required this.lastModifiedAt, }); + /// NameUid.id only keeps uid's leading comma-segment, which for lessons + /// is a recurring slot id shared across weeks — different dated lessons + /// in the same slot collided on the same cacheKey and overwrote each + /// other. Hash the full uid instead. + @override + int get id => uid.hashCode; + factory Lesson.fromJson(Map json) { var attachments = List.empty(growable: true); var rawAttachments = json['Csatolmanyok'];