Skip to content

Commit

Permalink
Fix primary color of nearby device row (#16)
Browse files Browse the repository at this point in the history
# Fix primary color of nearby device row

## ♻️ Current situation & Problem
Slight styling adjustments. Due to the button the device name was
rendered in the accent color. This fixes the label to be primary color
again.


## ⚙️ Release Notes 
* Fixed appearance of nearby device row.


## 📚 Documentation
--


## ✅ Testing
--

## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
Supereg authored Oct 25, 2024
1 parent 85aee3d commit 397c0e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct DiscardButton: View {


struct ConfirmMeasurementButton: View {
private let confirm: () async throws -> Void
private let confirm: @MainActor () async throws -> Void
private let discard: () -> Void

@ScaledMetric private var buttonHeight: CGFloat = 38
Expand All @@ -55,7 +55,7 @@ struct ConfirmMeasurementButton: View {
}
}

init(viewState: Binding<ViewState>, confirm: @escaping () async throws -> Void, discard: @escaping () -> Void) {
init(viewState: Binding<ViewState>, confirm: @escaping @MainActor () async throws -> Void, discard: @escaping () -> Void) {
self._viewState = viewState
self.confirm = confirm
self.discard = discard
Expand Down
2 changes: 2 additions & 0 deletions Sources/SpeziDevicesUI/Scanning/NearbyDeviceRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ public struct NearbyDeviceRow: View {
HStack {
ListRow(verbatim: peripheral.label) {
deviceSecondaryLabel
.foregroundStyle(.secondary)
}
if peripheral.state == .connecting || peripheral.state == .disconnecting {
ProgressView()
.accessibilityRemoveTraits(.updatesFrequently)
}
}
}
.foregroundStyle(.primary)

if showDetailsButton {
Button(action: deviceDetailsAction) {
Expand Down

0 comments on commit 397c0e8

Please sign in to comment.