mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 00:16:59 +00:00
feat(concord): add an Open channel action to the minichat thread
A Concord minichat pins its root and backfills it from the channel history, but when the root is still loading (or you aren't a member yet) there was no way out. Add an Open channel action to the top bar for Concord threads, navigating to the full channel (Route.Concord) where the whole timeline loads and membership lives — the correct affordance to click through to the chat room itself. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CzJ2Cwo8tg4oZq43oRa3ig
This commit is contained in:
+11
@@ -59,6 +59,7 @@ import com.vitorpamplona.amethyst.model.Note
|
||||
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.event.EventFinderFilterAssemblerSubscription
|
||||
import com.vitorpamplona.amethyst.ui.components.ThinPaddingTextField
|
||||
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||
import com.vitorpamplona.amethyst.ui.navigation.routes.Route
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.feed.ChatroomMessageCompose
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.feed.LocalSuppressReplyToNoteId
|
||||
@@ -146,6 +147,16 @@ fun MinichatScreen(
|
||||
SymbolIcon(symbol = MaterialSymbols.AutoMirrored.ArrowBack, contentDescription = stringRes(R.string.back))
|
||||
}
|
||||
},
|
||||
actions = {
|
||||
// For a Concord thread, always offer a jump to the full channel — the "chat room
|
||||
// itself", where the whole timeline loads and (if you aren't a member yet) you can
|
||||
// join. This is the way out when the pinned root is still backfilling or unavailable.
|
||||
if (isConcord) {
|
||||
IconButton(onClick = { nav.nav(Route.Concord(communityId!!, channelId!!)) }) {
|
||||
SymbolIcon(symbol = MaterialSymbols.Forum, contentDescription = stringRes(R.string.concord_open_channel))
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
},
|
||||
) { padding ->
|
||||
|
||||
@@ -313,6 +313,7 @@
|
||||
<string name="concord_channels_empty">No channels yet.</string>
|
||||
<string name="concord_show_all_channels">Show all channels</string>
|
||||
<string name="concord_send_image_title">Send image</string>
|
||||
<string name="concord_open_channel">Open channel</string>
|
||||
<string name="concord_typing_one">%1$s is typing…</string>
|
||||
<string name="concord_typing_two">%1$s and %2$s are typing…</string>
|
||||
<string name="concord_typing_many">Several people are typing…</string>
|
||||
|
||||
Reference in New Issue
Block a user