mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Set right default for weather kit setting
This commit is contained in:
parent
2888eb341b
commit
c779461c5d
4 changed files with 6 additions and 7 deletions
|
|
@ -162,7 +162,8 @@ extension UserDefaults {
|
|||
|
||||
@UserDefault(.firmwareVersion, defaultValue: "0.0.0")
|
||||
static var firmwareVersion: String
|
||||
@UserDefault(.environmentEnableWeatherKit, defaultValue: false)
|
||||
|
||||
@UserDefault(.environmentEnableWeatherKit, defaultValue: true)
|
||||
static var environmentEnableWeatherKit: Bool
|
||||
|
||||
@UserDefault(.testIntEnum, defaultValue: .one)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ struct ChannelList: View {
|
|||
VStack {
|
||||
// Display Contacts for the rest of the non admin channels
|
||||
if let node, let myInfo = node.myInfo, let channels = myInfo.channels?.array as? [ChannelEntity] {
|
||||
List(channels, id: \.self) { (channel: ChannelEntity) in
|
||||
List(channels, id: \.self, selection: $channelSelection) { (channel: ChannelEntity) in
|
||||
if !restrictedChannels.contains(channel.name?.lowercased() ?? "") {
|
||||
makeNavigationLink(myInfo: myInfo, channel: channel)
|
||||
.frame(height: 62)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ struct NodeInfoItem: View {
|
|||
.foregroundColor(getRssiColor(rssi: node.rssi))
|
||||
.font(.caption2)
|
||||
}
|
||||
.frame(minWidth: 90, maxWidth: 180)
|
||||
.frame(minWidth: 100, maxWidth: 140)
|
||||
}
|
||||
|
||||
if node.telemetries?.count ?? 0 > 0 {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ struct NodeList: View {
|
|||
@State private var hopsAway: Double = -1.0
|
||||
@State private var roleFilter = false
|
||||
@State private var deviceRoles: Set<Int> = []
|
||||
|
||||
|
||||
var boolFilters: [Bool] {[
|
||||
isOnline,
|
||||
isFavorite,
|
||||
|
|
@ -46,7 +46,7 @@ struct NodeList: View {
|
|||
NSSortDescriptor(key: "lastHeard", ascending: false),
|
||||
NSSortDescriptor(key: "user.longName", ascending: true),
|
||||
],
|
||||
animation: .default
|
||||
animation: .spring
|
||||
)
|
||||
var nodes: FetchedResults<NodeInfoEntity>
|
||||
|
||||
|
|
@ -299,7 +299,6 @@ struct NodeList: View {
|
|||
let hopsAwayPredicate = NSPredicate(format: "hopsAway > 0 AND hopsAway <= %i", Int32(hopsAway))
|
||||
predicates.append(hopsAwayPredicate)
|
||||
}
|
||||
|
||||
/// Online
|
||||
if isOnline {
|
||||
let isOnlinePredicate = NSPredicate(format: "lastHeard >= %@", Calendar.current.date(byAdding: .minute, value: -15, to: Date())! as NSDate)
|
||||
|
|
@ -333,7 +332,6 @@ struct NodeList: View {
|
|||
predicates.append(distancePredicate)
|
||||
}
|
||||
}
|
||||
|
||||
if predicates.count > 0 || !searchText.isEmpty {
|
||||
if !searchText.isEmpty {
|
||||
let filterPredicates = NSCompoundPredicate(type: .and, subpredicates: predicates)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue