fixed description thing
This commit is contained in:
parent
6ec9f84eab
commit
f5d8c61a62
@ -97,32 +97,32 @@ class LessonTile extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String description = '';
|
// String description = '';
|
||||||
String room = '';
|
// String room = '';
|
||||||
|
|
||||||
final cleanDesc = lesson.description
|
final cleanDesc = lesson.description
|
||||||
.specialChars()
|
.specialChars()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replaceAll(lesson.subject.name.specialChars().toLowerCase(), '');
|
.replaceAll(lesson.subject.name.specialChars().toLowerCase(), '');
|
||||||
|
|
||||||
if (!swapDesc) {
|
// if (!swapDesc) {
|
||||||
if (cleanDesc != "") {
|
// if (cleanDesc != "") {
|
||||||
description = lesson.description;
|
// description = lesson.description;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Changed lesson Description
|
// // Changed lesson Description
|
||||||
if (lesson.isChanged) {
|
// if (lesson.isChanged) {
|
||||||
if (lesson.status?.name == "Elmaradt") {
|
// if (lesson.status?.name == "Elmaradt") {
|
||||||
description = 'cancelled'.i18n;
|
// description = 'cancelled'.i18n;
|
||||||
} else if (lesson.substituteTeacher?.name != "") {
|
// } else if (lesson.substituteTeacher?.name != "") {
|
||||||
description = 'substitution'.i18n;
|
// description = 'substitution'.i18n;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
room = lesson.room.replaceAll("_", " ");
|
// room = lesson.room.replaceAll("_", " ");
|
||||||
} else {
|
// } else {
|
||||||
description = lesson.room.replaceAll("_", " ");
|
// description = lesson.room.replaceAll("_", " ");
|
||||||
}
|
// }
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 2.0),
|
padding: const EdgeInsets.only(bottom: 2.0),
|
||||||
@ -201,7 +201,7 @@ class LessonTile extends StatelessWidget {
|
|||||||
height: 10.0,
|
height: 10.0,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
lesson.description,
|
cleanDesc,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user