Skip to content

Commit

Permalink
Fix #101 Timeout Error when creating, renaming, or deleting Alt Names
Browse files Browse the repository at this point in the history
  • Loading branch information
b-camphart committed Jun 30, 2021
1 parent 6ad9d63 commit 0291008
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CharacterProfileView : View() {
private fun createNewAlternativeName(altName: NonBlankString) {
state.executingNameChange.set(true)
val controller = scope.projectScope.get<AddCharacterNameVariantController>()
scope.projectScope.applicationScope.get<ThreadTransformer>().gui {
CoroutineScope(Dispatchers.JavaFx).launch {
try {
controller.addCharacterNameVariant(state.characterId.value, altName).join()
state.isCreatingName.set(false)
Expand All @@ -68,7 +68,7 @@ class CharacterProfileView : View() {
private fun renameAlternativeName(currentName: NonBlankString, newName: NonBlankString) {
state.executingNameChange.set(true)
val controller = scope.projectScope.get<RenameCharacterNameVariantController>()
scope.projectScope.applicationScope.get<ThreadTransformer>().gui {
CoroutineScope(Dispatchers.JavaFx).launch {
controller.renameCharacterNameVariant(state.characterId.value, currentName, newName)
.join()
state.executingNameChange.set(false)
Expand All @@ -78,7 +78,7 @@ class CharacterProfileView : View() {
private fun removeAlternativeName(altName: NonBlankString) {
state.executingNameChange.set(true)
val controller = scope.projectScope.get<RemoveCharacterNameVariantController>()
scope.projectScope.applicationScope.get<ThreadTransformer>().gui {
CoroutineScope(Dispatchers.JavaFx).launch {
controller.removeCharacterNameVariant(state.characterId.value, altName)
.join()
state.executingNameChange.set(false)
Expand Down

0 comments on commit 0291008

Please sign in to comment.