Skip to content

Commit

Permalink
Bluetoothを有効にさせるアラートを出すメソッドの名前を変えた
Browse files Browse the repository at this point in the history
  • Loading branch information
Gurrium committed Jun 16, 2022
1 parent 793e410 commit 5899dec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Komusou/Extensions/View+AlertForEnablingBluetooth.swift
Expand Up @@ -9,7 +9,7 @@ import SwiftUI
import UIKit

extension View {
func alert(isBluetoothDisabled: Binding<Bool>) -> some View {
func alertForDisabledBluetooth(isBluetoothDisabled: Binding<Bool>) -> some View {
alert("Bluetoothを有効にしてください", isPresented: isBluetoothDisabled) {
Button("設定画面を開く") {
UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)
Expand Down
2 changes: 1 addition & 1 deletion Komusou/KomusouApp.swift
Expand Up @@ -62,7 +62,7 @@ struct KomusouApp: App {
.foregroundColor(.black)
}
}
.alert(isBluetoothDisabled: .constant(!isBluetoothEnabled))
.alertForDisabledBluetooth(isBluetoothDisabled: .constant(!isBluetoothEnabled))
.sheet(isPresented: $isSettingsPresented) {
SettingsView()
}
Expand Down
2 changes: 1 addition & 1 deletion Komusou/Settings/SensorSettingView.swift
Expand Up @@ -39,7 +39,7 @@ struct SensorSettingView: View {
}
}
.listStyle(.insetGrouped)
.alert(isBluetoothDisabled: .constant(!isBluetoothEnabled))
.alertForDisabledBluetooth(isBluetoothDisabled: .constant(!isBluetoothEnabled))
.onReceive(BluetoothManager.shared().$connectedSpeedSensor) { speedSensor in
self.connectedSpeedSensor = speedSensor
}
Expand Down

0 comments on commit 5899dec

Please sign in to comment.