Skip to content

Commit c268521

Browse files
committed
Simplify mute / unsub buttons in message list.
1 parent 2c95f3b commit c268521

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

Code/Screens/Balance/ChatScreen.swift

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct ChatScreen: View {
4343
VStack(spacing: 0) {
4444
MessageList(messages: chat.messages, exchange: exchange)
4545

46-
HStack(spacing: 10) {
46+
HStack(spacing: 0) {
4747
// Button {} label: {
4848
// Text("Mute")
4949
// .frame(maxWidth: .infinity)
@@ -66,11 +66,39 @@ struct ChatScreen: View {
6666
// .cornerRadius(999)
6767
// }
6868

69-
CodeButton(style: .filled, title: "Mute"/*, disabled: !chat.canMute*/) {}
70-
CodeButton(style: .filled, title: "Unsubscribe"/*, disabled: !chat.canUnsubscribe*/) {}
69+
// CodeButton(style: .filled, title: "Mute"/*, disabled: !chat.canMute*/) {}
70+
// CodeButton(style: .filled, title: "Unsubscribe"/*, disabled: !chat.canUnsubscribe*/) {}
71+
VStack {
72+
Button {} label: {
73+
Text("Mute")
74+
.frame(maxWidth: .infinity)
75+
.font(.appTextMedium)
76+
.foregroundStyle(Color.textSecondary)
77+
.padding(.vertical, 15)
78+
.padding(.horizontal, 30)
79+
.background(Color.white.opacity(0.01))
80+
}
81+
}
82+
.frame(maxWidth: .infinity, maxHeight: .infinity)
83+
.hSeparator(color: .rowSeparator, position: .trailing)
84+
85+
VStack {
86+
Button {} label: {
87+
Text("Unsubscribe")
88+
.frame(maxWidth: .infinity)
89+
.font(.appTextMedium)
90+
.foregroundStyle(Color.textSecondary)
91+
.padding(.vertical, 15)
92+
.padding(.horizontal, 30)
93+
.background(Color.white.opacity(0.01))
94+
}
95+
}
96+
.frame(maxWidth: .infinity, maxHeight: .infinity)
7197
}
72-
.padding(.vertical, 10)
73-
.padding(.horizontal, 20)
98+
.frame(height: 60)
99+
// .padding(.vertical, 10)
100+
// .padding(.horizontal, 20)
101+
.vSeparator(color: .rowSeparator, position: .top)
74102
}
75103
.onAppear {
76104
didAppear()

Code/Screens/Balance/MessageList.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public struct MessageList: View {
2424
// MARK: - Body -
2525

2626
public var body: some View {
27-
ScrollBox(color: .backgroundMain) {
27+
// ScrollBox(color: .backgroundMain) {
2828
GeometryReader { g in
2929
ScrollViewReader { scrollProxy in
3030
ScrollView(showsIndicators: false) {
@@ -83,7 +83,7 @@ public struct MessageList: View {
8383
}
8484
}
8585
}
86-
}
86+
// }
8787
}
8888
}
8989

0 commit comments

Comments
 (0)