From 3a8643a27eaf597ffb995cf6b3cb6ad63864861d Mon Sep 17 00:00:00 2001 From: Shafqat Muneer Date: Wed, 18 Sep 2024 16:18:34 +0500 Subject: [PATCH] fix: Respect `student_view_multi_device` key for HTML xBlocks in the Block API (#79) --- Course/Course/Presentation/Unit/CourseUnitViewModel.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Course/Course/Presentation/Unit/CourseUnitViewModel.swift b/Course/Course/Presentation/Unit/CourseUnitViewModel.swift index 8f4be45b8..bcff59cc9 100644 --- a/Course/Course/Presentation/Unit/CourseUnitViewModel.swift +++ b/Course/Course/Presentation/Unit/CourseUnitViewModel.swift @@ -20,14 +20,12 @@ public enum LessonType: Equatable { switch block.type { case .course, .chapter, .vertical, .sequential: return .unknown(block.studentUrl) - case .unknown: + case .html, .unknown: if let multiDevice = block.multiDevice, multiDevice { return .web(url: block.studentUrl, injections: mandatoryInjections) } else { return .unknown(block.studentUrl) } - case .html: - return .web(url: block.studentUrl, injections: mandatoryInjections) case .discussion: return .discussion(block.topicId ?? "", block.id, block.displayName) case .video: