firka_wear: trim the next lesson too

This commit is contained in:
2026-03-02 19:19:44 +01:00
parent 32d8481217
commit e07b0264b8

View File

@@ -267,9 +267,20 @@ class _WearHomeScreenState extends State<WearHomeScreen> {
Widget nextLessonWidget = SizedBox();
if (nextLesson != null) {
var nextLessonText = "${nextLesson.name}, ${nextLesson.roomName}";
if (nextLessonText.length > 10) {
if (nextLesson.roomName!.length > 10) {
nextLessonText =
"${nextLesson.name}, ${nextLesson.roomName!.substring(0, 6)}...";
} else {
nextLessonText =
"${nextLesson.name.substring(0, 10)}..., ${nextLesson.roomName}";
}
}
nextLessonWidget = Center(
child: Text(
"${nextLesson.name}, ${nextLesson.roomName}",
"$nextLessonText",
style: TextStyle(
color: wearStyle.colors.textPrimary,
fontSize: 12,