fix(concord): drop the create form from the back stack after creating

newStack only popped up to the new community's route, which was never on the
stack, so Back from a just-created community reopened the filled-in form. Pop
the form like the Marmot and relay-group creators do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vitor Pamplona
2026-09-29 13:47:37 -04:00
co-authored by Claude Opus 5.5
parent 9d29304b81
commit 9414da7d12
@@ -136,7 +136,10 @@ fun ConcordCreateScreen(
// Always re-enable — a thrown create would otherwise strand the button.
working = false
}
if (communityId != null) nav.newStack(Route.ConcordServer(communityId))
// Replace this form with the new community, as the Marmot and relay-group creators
// do. newStack only popped up to the community route itself, which was not on the
// stack, so Back from the new community reopened a filled-in create form.
if (communityId != null) nav.popUpTo(Route.ConcordServer(communityId), Route.ConcordCreate::class)
}
},
enabled = name.value.isNotBlank() && !working,