fix: add routing for poll draft editing

The routeEditDraftTo() function was missing cases for PollEvent and
ZapPollEvent, causing poll drafts to fall through to the else->null
branch and preventing navigation to the poll editor.

https://claude.ai/code/session_01WedCekkgCwNVCq2ybSTvqE
This commit is contained in:
Claude
2026-04-04 02:45:06 +00:00
parent e2a7f14c9a
commit 904711f0e7
@@ -30,6 +30,7 @@ import com.vitorpamplona.amethyst.model.User
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.quartz.experimental.ephemChat.chat.EphemeralChatEvent
import com.vitorpamplona.quartz.experimental.ephemChat.chat.RoomId
import com.vitorpamplona.quartz.experimental.zapPolls.ZapPollEvent
import com.vitorpamplona.quartz.nip01Core.core.AddressableEvent
import com.vitorpamplona.quartz.nip01Core.core.Event
import com.vitorpamplona.quartz.nip01Core.core.HexKey
@@ -51,6 +52,7 @@ import com.vitorpamplona.quartz.nip59Giftwrap.wraps.GiftWrapEvent
import com.vitorpamplona.quartz.nip72ModCommunities.definition.CommunityDefinitionEvent
import com.vitorpamplona.quartz.nip73ExternalIds.location.isGeohashedScoped
import com.vitorpamplona.quartz.nip73ExternalIds.topics.isHashtagScoped
import com.vitorpamplona.quartz.nip88Polls.poll.PollEvent
import com.vitorpamplona.quartz.nip89AppHandlers.definition.AppDefinitionEvent
import com.vitorpamplona.quartz.nip99Classifieds.ClassifiedsEvent
import com.vitorpamplona.quartz.nipA4PublicMessages.PublicMessageEvent
@@ -351,6 +353,14 @@ suspend fun routeEditDraftTo(
)
}
is PollEvent -> {
Route.NewPoll(draft = note.idHex)
}
is ZapPollEvent -> {
Route.NewPoll(draft = note.idHex)
}
is CommentEvent -> {
if (draft.isGeohashedScoped()) {
Route.GeoPost(draft = note.idHex)