implemented custom subject colors for the timetable and unified the color palette system
This commit is contained in:
1 parent
a7111844b1
commit
fe2b3c43b2
23 files changed
+916
-89
No files matched your search
@@ -121,6 +121,27 @@ class TimetableBloc
|
||||
await _refreshCustomEvents();
|
||||
}
|
||||
|
||||
/// Setzt die persönliche Farbe eines Fachs (Schlüssel: Fach-Kürzel) und lädt
|
||||
/// die Fächer neu, damit die eingebettete Farbe im Kalender wirkt.
|
||||
Future<void> setSubjectColor(String subjectShort, String color) async {
|
||||
await repo.data.setSubjectColor(subjectShort, color);
|
||||
await _refreshSubjects();
|
||||
}
|
||||
|
||||
Future<void> clearSubjectColor(String subjectShort) async {
|
||||
await repo.data.removeSubjectColor(subjectShort);
|
||||
await _refreshSubjects();
|
||||
}
|
||||
|
||||
Future<void> _refreshSubjects() async {
|
||||
final subjects = await repo.data.getSubjects(renew: true);
|
||||
add(
|
||||
DataGathered(
|
||||
(s) => s.copyWith(subjects: subjects, dataVersion: s.dataVersion + 1),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _loadCurrentWeek(
|
||||
DateTime startDate,
|
||||
DateTime endDate, {
|
||||
|
||||
Reference in new issue
Block a user