remove lessonTitleText in training module
This commit is contained in:
@@ -197,7 +197,9 @@ internal class PlayerChrome(
|
|||||||
}
|
}
|
||||||
val topContent = LinearLayout(activity).apply {
|
val topContent = LinearLayout(activity).apply {
|
||||||
orientation = LinearLayout.VERTICAL
|
orientation = LinearLayout.VERTICAL
|
||||||
addView(bindings.lessonTitleText)
|
if (screenState.activeModule != Module.TRAIN) {
|
||||||
|
addView(bindings.lessonTitleText)
|
||||||
|
}
|
||||||
if (screenState.activeModule == Module.TRAIN) {
|
if (screenState.activeModule == Module.TRAIN) {
|
||||||
addView(createContinuousPlaybackRow(translucent))
|
addView(createContinuousPlaybackRow(translucent))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import SwiftUI
|
|||||||
/// 与安卓端横屏布局一致:全屏播放 + 半透明句面板 + 退出全屏按钮。
|
/// 与安卓端横屏布局一致:全屏播放 + 半透明句面板 + 退出全屏按钮。
|
||||||
struct FullscreenPlayerView: View {
|
struct FullscreenPlayerView: View {
|
||||||
@ObservedObject var controller: PlayerController
|
@ObservedObject var controller: PlayerController
|
||||||
|
var showsLessonTitle: Bool = true
|
||||||
let onExit: () -> Void
|
let onExit: () -> Void
|
||||||
|
|
||||||
@State private var subtitleVisible = true
|
@State private var subtitleVisible = true
|
||||||
@@ -55,10 +56,12 @@ struct FullscreenPlayerView: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
if subtitleVisible {
|
if subtitleVisible {
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
Text(controller.currentItem?.title ?? "未选择课程")
|
if showsLessonTitle {
|
||||||
.font(.system(size: 17, weight: .bold))
|
Text(controller.currentItem?.title ?? "未选择课程")
|
||||||
.foregroundColor(.white)
|
.font(.system(size: 17, weight: .bold))
|
||||||
.lineLimit(1)
|
.foregroundColor(.white)
|
||||||
|
.lineLimit(1)
|
||||||
|
}
|
||||||
Text(sentenceMetaText)
|
Text(sentenceMetaText)
|
||||||
.font(.system(size: 13))
|
.font(.system(size: 13))
|
||||||
.foregroundColor(Theme.textOverlay)
|
.foregroundColor(Theme.textOverlay)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ struct PlayerSectionView: View {
|
|||||||
var showsContinuousToggle: Bool
|
var showsContinuousToggle: Bool
|
||||||
@Binding var continuousPlayback: Bool
|
@Binding var continuousPlayback: Bool
|
||||||
var showsSubtitle: Binding<Bool>? = .constant(true)
|
var showsSubtitle: Binding<Bool>? = .constant(true)
|
||||||
|
var showsLessonTitle: Bool = true
|
||||||
var onFullscreen: () -> Void
|
var onFullscreen: () -> Void
|
||||||
|
|
||||||
@State private var progressDragging = false
|
@State private var progressDragging = false
|
||||||
@@ -74,10 +75,12 @@ struct PlayerSectionView: View {
|
|||||||
|
|
||||||
private var sentencePanel: some View {
|
private var sentencePanel: some View {
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
Text(controller.currentItem?.title ?? "未选择课程")
|
if showsLessonTitle {
|
||||||
.font(.system(size: 17, weight: .bold))
|
Text(controller.currentItem?.title ?? "未选择课程")
|
||||||
.foregroundColor(.white)
|
.font(.system(size: 17, weight: .bold))
|
||||||
.lineLimit(1)
|
.foregroundColor(.white)
|
||||||
|
.lineLimit(1)
|
||||||
|
}
|
||||||
if showsContinuousToggle {
|
if showsContinuousToggle {
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
Text("连续播放")
|
Text("连续播放")
|
||||||
|
|||||||
@@ -113,7 +113,10 @@ struct RootView: View {
|
|||||||
syncCurrentCourse(with: videoHash)
|
syncCurrentCourse(with: videoHash)
|
||||||
}
|
}
|
||||||
.fullScreenCover(isPresented: $showFullscreenPlayer) {
|
.fullScreenCover(isPresented: $showFullscreenPlayer) {
|
||||||
FullscreenPlayerView(controller: controller) {
|
FullscreenPlayerView(
|
||||||
|
controller: controller,
|
||||||
|
showsLessonTitle: activeModule != .train
|
||||||
|
) {
|
||||||
exitFullscreen()
|
exitFullscreen()
|
||||||
}
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ struct TrainingView: View {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
showsContinuousToggle: true,
|
showsContinuousToggle: true,
|
||||||
continuousPlayback: $continuousPlayback,
|
continuousPlayback: $continuousPlayback,
|
||||||
|
showsLessonTitle: false,
|
||||||
onFullscreen: onFullscreen
|
onFullscreen: onFullscreen
|
||||||
)
|
)
|
||||||
CatalogView(vm: catalogVM)
|
CatalogView(vm: catalogVM)
|
||||||
|
|||||||
Reference in New Issue
Block a user