Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
radeknovis committed Jul 20, 2023
1 parent 29c5136 commit 0647a44
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
12 changes: 7 additions & 5 deletions Sources/WalletConnectModal/Modal/ModalSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ public struct ModalSheet: View {
TextField("Search", text: $viewModel.searchTerm, onEditingChanged: { editing in
self.searchEditing = editing
})
.transform { view in
#if os(macOS)
view
#else
view.autocapitalization(.none)
#endif
}
}
.padding(.vertical, 4)
.padding(.horizontal, 10)
Expand All @@ -107,11 +114,6 @@ public struct ModalSheet: View {
.onDisappear {
searchEditing = false
}
.transform {
#if os(iOS)
$0.autocapitalization(.none)
#endif
}
.padding(.horizontal, 50)
} else {
Text(viewModel.destination.contentTitle)
Expand Down
2 changes: 1 addition & 1 deletion Sources/WalletConnectModal/Modal/ModalViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ final class ModalViewModel: ObservableObject {
.sink { sessions in
print(sessions)
isShown.wrappedValue = false
self.toast = Toast(style: .success, message: "Session estabilished", duration: 15)
self.toast = Toast(style: .success, message: "Session estabilished", duration: 5)
}
.store(in: &disposeBag)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ struct WhatIsWalletView: View {
.padding(.bottom, 40)
}
}
.tabViewStyle(.page(indexDisplayMode: .always))
.transform {
#if os(iOS)
$0.tabViewStyle(.page(indexDisplayMode: .always))
#endif
}
.frame(height: 150)

} else {
Expand Down
4 changes: 2 additions & 2 deletions Sources/WalletConnectModal/UI/Common/Toast.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import SwiftUI

struct Toast: Equatable {
var style: ToastStyle
var message: String
let style: ToastStyle
let message: String
var duration: Double = 3
var width: Double = .infinity
}
Expand Down

0 comments on commit 0647a44

Please sign in to comment.