Make copiable text multiline by default

This commit is contained in:
Davide De Rosa 2024-10-05 00:17:08 +02:00
parent d2f44d3ee2
commit 8b5096ab69
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
3 changed files with 5 additions and 5 deletions

View File

@ -130,7 +130,7 @@ private extension IPView {
func row(forRoute route: Route, removeAction: @escaping () -> Void) -> some View {
ThemeRemovableItemRow(isEditing: true) {
ThemeCopiableText(value: route.localizedDescription, isMultiLine: true)
ThemeCopiableText(value: route.localizedDescription)
} removeAction: {
removeAction()
}

View File

@ -45,7 +45,7 @@ enum ModuleRow: Hashable {
case textList(caption: String, values: [String])
case copiableText(caption: String? = nil, value: String)
case copiableText(caption: String? = nil, value: String, multiline: Bool = true)
case longContent(caption: String, value: String)
@ -112,8 +112,8 @@ private extension View {
.withTrailingText(Strings.Global.empty)
}
case .copiableText(let caption, let value):
ThemeCopiableText(title: caption, value: value)
case .copiableText(let caption, let value, let multiline):
ThemeCopiableText(title: caption, value: value, isMultiLine: multiline)
case .longContent(let title, let content):
LongContentLink(title, content: .constant(content)) {

View File

@ -386,7 +386,7 @@ struct ThemeCopiableText: View {
let value: String
var isMultiLine = false
var isMultiLine = true
var body: some View {
HStack {