feat(ios): iPhone channel drill-down, fix chat compose box, unify chat+activity
- Channels tab is now a drill-down on iPhone: ChannelBrowserView lists top-level
channels; ChannelDetailView shows the people in a channel, its sub-channels, and
an explicit Join button (with password prompt). iPad split view unchanged.
- Extract self-contained UserRow (context menu + sheets) from UserListView so admin
actions are reused in the drill-down.
- Fix off-screen chat compose box: pin VoiceControlsView via per-tab
.safeAreaInset(edge: .bottom) instead of a floating overlay, so it reserves layout
space above the tab bar (keeping the compose box visible, cooperating with keyboard
avoidance) without covering the tab bar buttons.
- Collapse Activity into Chat like macOS/Windows: ChatView renders a merged,
time-sorted timeline of messages + activity (activity rows in gray); remove the
Activity tab and ActivityLogView.
- Label the RPSystemBroadcastPickerView inner UIButton for VoiceOver
("Share/Stop sharing screen audio") instead of relying on an outer SwiftUI label.
This commit is contained in:
@@ -24,26 +24,33 @@ private struct iPhoneMainView: View {
|
||||
|
||||
var body: some View {
|
||||
TabView {
|
||||
ChannelTreeView(session: session)
|
||||
ChannelBrowserView(session: session)
|
||||
.voiceControlsBar(session)
|
||||
.tabItem {
|
||||
Label("Channels", systemImage: "list.bullet.indent")
|
||||
}
|
||||
ChatView(session: session)
|
||||
.voiceControlsBar(session)
|
||||
.tabItem {
|
||||
Label("Chat", systemImage: "message")
|
||||
}
|
||||
ActivityLogView(session: session)
|
||||
.tabItem {
|
||||
Label("Activity", systemImage: "bell")
|
||||
}
|
||||
SettingsView(session: session)
|
||||
.voiceControlsBar(session)
|
||||
.tabItem {
|
||||
Label("Settings", systemImage: "gear")
|
||||
}
|
||||
}
|
||||
.overlay(alignment: .bottom) {
|
||||
}
|
||||
}
|
||||
|
||||
private extension View {
|
||||
/// Pin the shared voice controls just above the tab bar, *inside each tab's content area*.
|
||||
/// Applying this per-tab (rather than to the TabView itself) reserves layout space above
|
||||
/// the tab bar — keeping ChatView's compose box visible and cooperating with keyboard
|
||||
/// avoidance — without the bar covering the tab bar's buttons.
|
||||
func voiceControlsBar(_ session: SessionState) -> some View {
|
||||
safeAreaInset(edge: .bottom) {
|
||||
VoiceControlsView(session: session)
|
||||
.padding(.bottom, 56) // above tab bar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user