Skip to content

Commit

Permalink
Only highlight soon upcoming events (#1682)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImGxrke and nilsreichardt authored Jul 16, 2024
1 parent 9dd1f42 commit b34ff46
Show file tree
Hide file tree
Showing 19 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ class _SharezonePlusAd extends StatelessWidget {
return EventView(
groupID: 'groupId',
dateText: dateText,
upcomingSoon: false,
title: title,
courseName: courseName,
event: CalendricalEvent(
Expand Down
5 changes: 3 additions & 2 deletions app/lib/timetable/src/widgets/events/calender_event_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ class CalenderEventCard extends StatelessWidget {
_Title(title: view.title),
const SizedBox(height: 6),
Text(view.dateText,
style:
TextStyle(color: Theme.of(context).colorScheme.error))
style: view.upcomingSoon
? const TextStyle(color: Colors.red)
: null),
],
),
),
Expand Down
3 changes: 3 additions & 0 deletions app/lib/timetable/src/widgets/events/event_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class EventView {
final String? courseName;
final String groupID, dateText, title;
final Design? design;
final bool upcomingSoon;

// Wird nur für die Weitergabe an die Event-Edit
// und das Event-Sheet verwendet, weil diese noch
Expand All @@ -25,6 +26,7 @@ class EventView {
required this.groupID,
this.courseName,
required this.dateText,
required this.upcomingSoon,
required this.title,
required this.event,
this.design,
Expand All @@ -38,6 +40,7 @@ class EventView {
groupID: event.groupID,
courseName: info?.name,
dateText: DateParser(event.date).toYMMMd,
upcomingSoon: event.date.isBefore(Date.today().addDays(14)),
title: event.title,
design: info?.design,
event: event,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void main() {
random.nextInt(12) + 1,
random.nextInt(28) + 1,
).toIso8601String(),
upcomingSoon: true,
event: MockCalendricalEvent(),
groupID: '${random.nextInt(1000)}',
courseName: 'Course ${random.nextInt(1000)}',
Expand Down

0 comments on commit b34ff46

Please sign in to comment.