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'];