Skip to content

Commit

Permalink
Narration listens to navigation requests
Browse files Browse the repository at this point in the history
  • Loading branch information
darrellcolehill committed Jun 3, 2024
1 parent 23ac72d commit 3761a05
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import org.wycliffeassociates.otter.jvm.workbookapp.ui.narration.markers.MARKER_
import org.wycliffeassociates.otter.jvm.workbookapp.ui.narration.markers.MARKER_WIDTH
import org.wycliffeassociates.otter.jvm.workbookapp.ui.narration.markers.VerseMarkerControl
import org.wycliffeassociates.otter.jvm.workbookapp.ui.narration.waveform.NarrationWaveformRenderer
import org.wycliffeassociates.otter.jvm.workbookapp.ui.screens.HomePage2
import org.wycliffeassociates.otter.jvm.workbookapp.ui.viewmodel.AppPreferencesStore
import org.wycliffeassociates.otter.jvm.workbookapp.ui.viewmodel.AudioPluginViewModel
import org.wycliffeassociates.otter.jvm.workbookapp.ui.viewmodel.WorkbookDataStore
Expand Down Expand Up @@ -178,7 +179,11 @@ class NarrationViewModel : ViewModel() {
onTaskRunnerIdle = {
FX.eventbus.fire(it.navigationRequest)
}
} else if (pluginOpenedProperty.value) {
}
}

subscribe<NavigationRequestEvent>() {
if (it.view == find<HomePage2>() && pluginOpenedProperty.value) {
navigator.navigateHomeOnPluginClosed = true
fire(PluginCloseRequestEvent)
}
Expand Down

0 comments on commit 3761a05

Please sign in to comment.