File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
course/src/main/java/org/openedx/course/presentation/unit/video Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ class EncodedVideoUnitViewModel(
106106 CastContext .getSharedInstance(context, executor).addOnCompleteListener {
107107 it.result?.let { castContext ->
108108 castPlayer = CastPlayer (castContext)
109+ isUpdatedMutable.value = true
109110 }
110111 }
111112 }
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ open class VideoUnitViewModel(
4040 val currentVideoTime: LiveData <Long >
4141 get() = _currentVideoTime
4242
43- private val _isUpdated = MutableLiveData (true )
43+ protected val isUpdatedMutable = MutableLiveData (true )
4444 val isUpdated: LiveData <Boolean >
45- get() = _isUpdated
45+ get() = isUpdatedMutable
4646
4747 private val _currentIndex = MutableStateFlow (0 )
4848 val currentIndex = _currentIndex .asStateFlow()
@@ -63,9 +63,9 @@ open class VideoUnitViewModel(
6363 viewModelScope.launch {
6464 notifier.notifier.collect {
6565 if (it is CourseVideoPositionChanged && videoUrl == it.videoUrl) {
66- _isUpdated .value = false
66+ isUpdatedMutable .value = false
6767 _currentVideoTime .value = it.videoTime
68- _isUpdated .value = true
68+ isUpdatedMutable .value = true
6969 isPlaying = it.isPlaying
7070 } else if (it is CourseSubtitleLanguageChanged ) {
7171 transcriptLanguage = it.value
You can’t perform that action at this time.
0 commit comments