From c747d51167a6e8c5a0094bec13f4190b8b066ffd Mon Sep 17 00:00:00 2001 From: Kelrap Date: Thu, 30 Oct 2025 10:11:21 -0400 Subject: [PATCH] Remove unneeded parameter --- lib/pangea/login/pages/new_course_page.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pangea/login/pages/new_course_page.dart b/lib/pangea/login/pages/new_course_page.dart index 1ff64bc1e..01a3bff97 100644 --- a/lib/pangea/login/pages/new_course_page.dart +++ b/lib/pangea/login/pages/new_course_page.dart @@ -95,11 +95,11 @@ class NewCoursePageState extends State { } } - Future _onSelect(CoursePlanModel course, bool isAddingPlan) async { + Future _onSelect(CoursePlanModel course) async { final existingRoom = Matrix.of(context).client.getRoomByCourseId(course.uuid); - if (existingRoom == null || isAddingPlan) { + if (existingRoom == null || widget.spaceId != null) { context.go( widget.spaceId != null ? '/rooms/spaces/${widget.spaceId}/addcourse/${course.uuid}' @@ -286,7 +286,7 @@ class NewCoursePageState extends State { return Material( type: MaterialType.transparency, child: InkWell( - onTap: () => _onSelect(course, spaceId != null), + onTap: () => _onSelect(course), borderRadius: BorderRadius.circular(12.0), child: Container( padding: const EdgeInsets.all(12.0),