fix: refresh course details when course ID changes in course details
This commit is contained in:
parent
a8ac92d49f
commit
e9c4e9b400
2 changed files with 4 additions and 2 deletions
|
|
@ -77,7 +77,9 @@ class ChatDetailsController extends State<ChatDetails>
|
|||
@override
|
||||
void didUpdateWidget(covariant ChatDetails oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (oldWidget.roomId != widget.roomId) {
|
||||
final room = Matrix.of(context).client.getRoomById(widget.roomId);
|
||||
if (oldWidget.roomId != widget.roomId ||
|
||||
course?.uuid != room?.coursePlan?.uuid) {
|
||||
_loadCourseInfo();
|
||||
_loadSummaries();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ class SelectedCourseController extends State<SelectedCourse>
|
|||
}
|
||||
|
||||
if (!mounted) return;
|
||||
context.push("/rooms/spaces/${space.id}/details?tab=course");
|
||||
context.go("/rooms/spaces/${space.id}/details?tab=course");
|
||||
}
|
||||
|
||||
Future<void> joinCourse() async {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue