fixed little issues with lesson popups

This commit is contained in:
Kima 2024-05-21 19:46:47 +02:00
parent a319b26d82
commit 416f42f42d
2 changed files with 15 additions and 9 deletions

View File

@ -481,13 +481,15 @@ class TimetableLessonPopup extends StatelessWidget {
height: 8.0,
),
Text(
(lesson.teacher.isRenamed &&
Provider.of<SettingsProvider>(context,
listen: false)
.renamedTeachersEnabled)
? (lesson.teacher.renamedTo ??
lesson.teacher.name)
: lesson.teacher.name,
((lesson.substituteTeacher == null ||
lesson.substituteTeacher!.name == "")
? (lesson.teacher.isRenamed
? lesson.teacher.renamedTo
: lesson.teacher.name)
: (lesson.substituteTeacher!.isRenamed
? lesson.substituteTeacher!.renamedTo
: lesson.substituteTeacher!.name)) ??
'',
style: TextStyle(
color: AppColors.of(context).text.withOpacity(0.9),
fontSize: 14.0,

View File

@ -20,7 +20,7 @@ import 'package:refilc_mobile_ui/common/empty.dart';
import 'package:refilc_mobile_ui/common/profile_image/profile_button.dart';
import 'package:refilc_mobile_ui/common/profile_image/profile_image.dart';
import 'package:refilc_mobile_ui/common/system_chrome.dart';
import 'package:refilc_mobile_ui/common/widgets/lesson/lesson_view.dart';
// import 'package:refilc_mobile_ui/common/widgets/lesson/lesson_view.dart';
import 'package:refilc_kreta_api/controllers/timetable_controller.dart';
import 'package:refilc_mobile_ui/common/widgets/lesson/lesson_viewable.dart';
import 'package:refilc_mobile_ui/pages/timetable/day_title.dart';
@ -61,7 +61,11 @@ class TimetablePage extends StatefulWidget {
NavigationScreen.of(context)?.setPage("timetable");
// Show initial Lesson
if (lesson != null) LessonView.show(lesson, context: context);
// if (lesson != null) LessonView.show(lesson, context: context);
// changed to new popup
if (lesson != null) {
TimetableLessonPopup.show(context: context, lesson: lesson);
}
}
@override