1
0
forked from firka/firka

fix(api): derive lesson cache key from full uid hash

This commit is contained in:
2026-09-16 14:27:55 +02:00
parent 5a15894833
commit 857fa5e230

View File

@@ -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<String, dynamic> json) {
var attachments = List<NameUid>.empty(growable: true);
var rawAttachments = json['Csatolmanyok'];