Skip to content

Commit

Permalink
[MBL-1541] Update viewmodel to always update if the play button is vi…
Browse files Browse the repository at this point in the history
…sible on project videos (#2060)

* update viewmodel to always update if the play button is visible

* fix tests
  • Loading branch information
mtgriego authored Jun 20, 2024
1 parent 8a6729f commit 2342c96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,6 @@ interface ProjectPageViewModel {
.map {
it.hasVideo()
}
.distinctUntilChanged()
.subscribe { this.playButtonIsVisible.onNext(it) }
.addToDisposable(disposables)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class ProjectPageViewModelTest : KSRobolectricTestCase() {

this.vm.configureWith(Intent().putExtra(IntentKey.PROJECT, project))

playButtonIsVisible.assertValues(false)
playButtonIsVisible.assertValues(false, false)
}

@Test
Expand All @@ -385,7 +385,7 @@ class ProjectPageViewModelTest : KSRobolectricTestCase() {

this.vm.configureWith(Intent().putExtra(IntentKey.PROJECT, project))

playButtonIsVisible.assertValues(true)
playButtonIsVisible.assertValues(true, true)
}

@Test
Expand Down

0 comments on commit 2342c96

Please sign in to comment.