mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
27 lines
656 B
Swift
27 lines
656 B
Swift
|
|
//
|
||
|
|
// TileHeightKeys.swift
|
||
|
|
// Meshtastic
|
||
|
|
//
|
||
|
|
// Created by Garth Vander Houwen on 9/21/25.
|
||
|
|
//
|
||
|
|
|
||
|
|
import SwiftUI
|
||
|
|
|
||
|
|
struct WeatherKitTilesHeightKey: PreferenceKey {
|
||
|
|
static var defaultValue: CGFloat = 0
|
||
|
|
|
||
|
|
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
|
||
|
|
// This method combines values from multiple child views if needed
|
||
|
|
value = max(value, nextValue())
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
struct EnvironmentMetricsTilesHeightKey: PreferenceKey {
|
||
|
|
static var defaultValue: CGFloat = 0
|
||
|
|
|
||
|
|
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
|
||
|
|
// This method combines values from multiple child views if needed
|
||
|
|
value = max(value, nextValue())
|
||
|
|
}
|
||
|
|
}
|