mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 08:33:09 +00:00
* ios: programmatic navigation between list/chat * prevent chat info sheet from showing when switching conversation * add direct chat with member to model * set status to connected Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
31 lines
626 B
Swift
31 lines
626 B
Swift
//
|
|
// NavLinkPlain.swift
|
|
// SimpleX
|
|
//
|
|
// Created by Evgeny Poberezkin on 11/02/2022.
|
|
// Copyright © 2022 SimpleX Chat. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct NavLinkPlain<V: Hashable, Label: View>: View {
|
|
@State var tag: V
|
|
@Binding var selection: V?
|
|
@ViewBuilder var label: () -> Label
|
|
var disabled = false
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
Button("") { selection = tag }
|
|
.disabled(disabled)
|
|
label()
|
|
}
|
|
}
|
|
}
|
|
|
|
//struct NavLinkPlain_Previews: PreviewProvider {
|
|
// static var previews: some View {
|
|
// NavLinkPlain()
|
|
// }
|
|
//}
|