mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Refactors both the channel and user message views to isolate typing state which prevents excessive re-rendering of large message lists on every new character typed. Also consolidates typing view code of both lists into the new TextMessageField and related sub views.
20 lines
401 B
Swift
20 lines
401 B
Swift
import SwiftUI
|
|
|
|
struct RequestPositionButton: View {
|
|
let action: () -> Void
|
|
|
|
var body: some View {
|
|
Button(action: action) {
|
|
Image(systemName: "mappin.and.ellipse")
|
|
.symbolRenderingMode(.hierarchical)
|
|
.imageScale(.large)
|
|
.foregroundColor(.accentColor)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct RequestPositionButtonPreview: PreviewProvider {
|
|
static var previews: some View {
|
|
RequestPositionButton {}
|
|
}
|
|
}
|