-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save and quit before navigating home from marker app (OT-884) #1147
Save and quit before navigating home from marker app (OT-884) #1147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @darrellcolehill and @jsarabia)
jvm/workbookapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/workbookapp/ui/NavigationMediator.kt
line 104 at r1 (raw file):
val homePage = find<HomePage2>() fire(NavigationRequestEvent(homePage)) NavigationRequestEvent(homePage)
what's this line for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @AnonymousWalker and @jsarabia)
jvm/workbookapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/workbookapp/ui/NavigationMediator.kt
line 104 at r1 (raw file):
Previously, AnonymousWalker (Tony) wrote…
what's this line for?
Thanks for catching that! I am not sure why that is there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @AnonymousWalker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @darrellcolehill)
jvm/markerapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/markerapp/app/view/MarkerView.kt
line 72 at r2 (raw file):
} subscribe<NavigationRequestBlockedEvent> {
Would it be possible to use the existing PluginCloseRequestEvent
approach? I believe marker app is also a "plugin" and we have solved a similar problem using that event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @AnonymousWalker)
jvm/markerapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/markerapp/app/view/MarkerView.kt
line 72 at r2 (raw file):
Previously, AnonymousWalker (Tony) wrote…
Would it be possible to use the existing
PluginCloseRequestEvent
approach? I believe marker app is also a "plugin" and we have solved a similar problem using that event.
The issue I was having with that was with coordinating the narration view model since it is still docked. Are you thinking of firing the PluginClosRequestEvent on home button click when the marker app is open?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @AnonymousWalker)
jvm/workbookapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/workbookapp/ui/narration/NarrationViewModel.kt
line 182 at r3 (raw file):
} } else if (pluginOpenedProperty.value) { navigator.navigateHomeOnPluginClosed = true
@AnonymousWalker This could be modified by doing the following:
- Move navigateHomeOnPluginClosed from the navigator, to NarrationViewModel
- Allow PluginClosedEvent to take in an optional parameter named something like "naviateHome" that has a default value of false
- Have the navigator's subscription to PluginClosedEvent navigate home when navigateHome == true
- Pass the value of navigateHome when firing PluginClosedEvent in onChapterReturnFromPlugin
I am not crazy about adding another Boolean in the NarrationViewModel, but the above steps seem more in line with what we discussed earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 4 unresolved discussions (waiting on @darrellcolehill and @jsarabia)
jvm/workbookapp/src/main/kotlin/org/wycliffeassociates/otter/jvm/workbookapp/ui/narration/NarrationViewModel.kt
line 186 at r4 (raw file):
subscribe<NavigationRequestEvent>() { if (it.view == find<HomePage2>() && pluginOpenedProperty.value) {
could we do it.view is HomePage2
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 4 unresolved discussions (waiting on @AnonymousWalker and @darrellcolehill)
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)