Skip to content

Commit

Permalink
Simplify mute / unsub buttons in message list.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbart01 committed Nov 30, 2023
1 parent 2c95f3b commit c268521
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
38 changes: 33 additions & 5 deletions Code/Screens/Balance/ChatScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct ChatScreen: View {
VStack(spacing: 0) {
MessageList(messages: chat.messages, exchange: exchange)

HStack(spacing: 10) {
HStack(spacing: 0) {
// Button {} label: {
// Text("Mute")
// .frame(maxWidth: .infinity)
Expand All @@ -66,11 +66,39 @@ struct ChatScreen: View {
// .cornerRadius(999)
// }

CodeButton(style: .filled, title: "Mute"/*, disabled: !chat.canMute*/) {}
CodeButton(style: .filled, title: "Unsubscribe"/*, disabled: !chat.canUnsubscribe*/) {}
// CodeButton(style: .filled, title: "Mute"/*, disabled: !chat.canMute*/) {}
// CodeButton(style: .filled, title: "Unsubscribe"/*, disabled: !chat.canUnsubscribe*/) {}
VStack {
Button {} label: {
Text("Mute")
.frame(maxWidth: .infinity)
.font(.appTextMedium)
.foregroundStyle(Color.textSecondary)
.padding(.vertical, 15)
.padding(.horizontal, 30)
.background(Color.white.opacity(0.01))
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.hSeparator(color: .rowSeparator, position: .trailing)

VStack {
Button {} label: {
Text("Unsubscribe")
.frame(maxWidth: .infinity)
.font(.appTextMedium)
.foregroundStyle(Color.textSecondary)
.padding(.vertical, 15)
.padding(.horizontal, 30)
.background(Color.white.opacity(0.01))
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
.padding(.vertical, 10)
.padding(.horizontal, 20)
.frame(height: 60)
// .padding(.vertical, 10)
// .padding(.horizontal, 20)
.vSeparator(color: .rowSeparator, position: .top)
}
.onAppear {
didAppear()
Expand Down
4 changes: 2 additions & 2 deletions Code/Screens/Balance/MessageList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public struct MessageList: View {
// MARK: - Body -

public var body: some View {
ScrollBox(color: .backgroundMain) {
// ScrollBox(color: .backgroundMain) {
GeometryReader { g in
ScrollViewReader { scrollProxy in
ScrollView(showsIndicators: false) {
Expand Down Expand Up @@ -83,7 +83,7 @@ public struct MessageList: View {
}
}
}
}
// }
}
}

Expand Down

0 comments on commit c268521

Please # to comment.