Skip to content

Commit

Permalink
Removed MarkerView's subscription on NavigationRequestBlockedEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
darrellcolehill committed Jun 3, 2024
1 parent c13597c commit 23ac72d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,12 @@ class MarkerView : PluginEntrypoint() {
tryImportStylesheet(resources["/css/verse-marker-app.css"])
tryImportStylesheet(resources["/css/scrolling-waveform.css"])
tryImportStylesheet(resources["/css/chunk-marker.css"])

subscribe<PluginCloseRequestEvent> {
unsubscribe()
viewModel.saveAndQuit()
}

subscribe<NavigationRequestBlockedEvent> {
unsubscribe()
viewModel.saveAndQuit()
}

subscribe<MarkerMovedEvent> {
viewModel.moveMarker(it.markerId, it.start, it.end)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import org.wycliffeassociates.otter.jvm.workbookapp.ui.narration.waveform.Narrat
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
import org.wycliffeassociates.otter.jvm.workbookplugin.plugin.PluginCloseRequestEvent
import tornadofx.*
import java.io.File
import java.text.MessageFormat
Expand Down Expand Up @@ -179,6 +180,7 @@ class NarrationViewModel : ViewModel() {
}
} else if (pluginOpenedProperty.value) {
navigator.navigateHomeOnPluginClosed = true
fire(PluginCloseRequestEvent)
}
}

Expand Down

0 comments on commit 23ac72d

Please sign in to comment.