From e07b0264b836824b064f3c0a85ea9b1c32f76b42 Mon Sep 17 00:00:00 2001 From: Armand <4831c0@proton.me> Date: Mon, 2 Mar 2026 19:19:44 +0100 Subject: [PATCH] firka_wear: trim the next lesson too --- .../lib/ui/wear/screens/home/home_screen.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/firka_wear/lib/ui/wear/screens/home/home_screen.dart b/firka_wear/lib/ui/wear/screens/home/home_screen.dart index d427f2b8..d16ce240 100644 --- a/firka_wear/lib/ui/wear/screens/home/home_screen.dart +++ b/firka_wear/lib/ui/wear/screens/home/home_screen.dart @@ -267,9 +267,20 @@ class _WearHomeScreenState extends State { 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,