From 183f7ea5ad4455e328ae3d8b93983c7d763929e3 Mon Sep 17 00:00:00 2001 From: DGoiana Date: Sun, 3 Sep 2023 21:52:35 +0100 Subject: [PATCH] Cleaning code --- uni/lib/controller/parsers/parser_calendar.dart | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/uni/lib/controller/parsers/parser_calendar.dart b/uni/lib/controller/parsers/parser_calendar.dart index e98d5467d..0d3cb2bad 100644 --- a/uni/lib/controller/parsers/parser_calendar.dart +++ b/uni/lib/controller/parsers/parser_calendar.dart @@ -7,21 +7,16 @@ Future> 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() != ' ' && event.date.trim() != ' ', ) .toList(); - - return filteredCalendar; }