Skip to content

Commit

Permalink
Cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
DGoiana committed Sep 3, 2023
1 parent 4cbe514 commit 183f7ea
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions uni/lib/controller/parsers/parser_calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@ Future<List<CalendarEvent>> getCalendarFromHtml(Response response) async {

final calendarHtml = document.querySelectorAll('tr');

final eventList = calendarHtml
return calendarHtml
.map(
(event) => CalendarEvent(
event.children[0].innerHtml,
event.children[1].innerHtml,
),
)
.toList();

final filteredCalendar = eventList
.where(
(event) =>
event.name.trim() != '&nbsp;' && event.date.trim() != '&nbsp;',
)
.toList();

return filteredCalendar;
}

0 comments on commit 183f7ea

Please sign in to comment.