From f5d8c61a62f08697eb60ab3dfde9145adf57bd6f Mon Sep 17 00:00:00 2001 From: Kima Date: Mon, 1 Jan 2024 22:27:49 +0100 Subject: [PATCH] fixed description thing --- .../lib/ui/widgets/lesson/lesson_tile.dart | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/filcnaplo/lib/ui/widgets/lesson/lesson_tile.dart b/filcnaplo/lib/ui/widgets/lesson/lesson_tile.dart index ef5a252..e366446 100644 --- a/filcnaplo/lib/ui/widgets/lesson/lesson_tile.dart +++ b/filcnaplo/lib/ui/widgets/lesson/lesson_tile.dart @@ -97,32 +97,32 @@ class LessonTile extends StatelessWidget { } } - String description = ''; - String room = ''; + // String description = ''; + // String room = ''; final cleanDesc = lesson.description .specialChars() .toLowerCase() .replaceAll(lesson.subject.name.specialChars().toLowerCase(), ''); - if (!swapDesc) { - if (cleanDesc != "") { - description = lesson.description; - } + // if (!swapDesc) { + // if (cleanDesc != "") { + // description = lesson.description; + // } - // Changed lesson Description - if (lesson.isChanged) { - if (lesson.status?.name == "Elmaradt") { - description = 'cancelled'.i18n; - } else if (lesson.substituteTeacher?.name != "") { - description = 'substitution'.i18n; - } - } + // // Changed lesson Description + // if (lesson.isChanged) { + // if (lesson.status?.name == "Elmaradt") { + // description = 'cancelled'.i18n; + // } else if (lesson.substituteTeacher?.name != "") { + // description = 'substitution'.i18n; + // } + // } - room = lesson.room.replaceAll("_", " "); - } else { - description = lesson.room.replaceAll("_", " "); - } + // room = lesson.room.replaceAll("_", " "); + // } else { + // description = lesson.room.replaceAll("_", " "); + // } return Padding( padding: const EdgeInsets.only(bottom: 2.0), @@ -201,7 +201,7 @@ class LessonTile extends StatelessWidget { height: 10.0, ), Text( - lesson.description, + cleanDesc, maxLines: 1, overflow: TextOverflow.ellipsis, textAlign: TextAlign.start,