mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-10 23:15:50 +00:00
* ios: shooth chat switching * debug button * navigation timeout * fix scroll crash * fix merge * whitespace * wip * add spinner; extract load and nav logic * cleanup * direct chat button * cleanup * showLoadingProgress * reverse rename * rename * spinner layout * move all programmatic navigation to `openLoadChat` * remove access restriction * fix scroll on item added regression * print * fix page load regression * fix member sheet disappearing --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
32 lines
661 B
Swift
32 lines
661 B
Swift
//
|
|
// NavLinkPlain.swift
|
|
// SimpleX
|
|
//
|
|
// Created by Evgeny Poberezkin on 11/02/2022.
|
|
// Copyright © 2022 SimpleX Chat. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
import SimpleXChat
|
|
|
|
struct NavLinkPlain<Label: View>: View {
|
|
let chatId: ChatId
|
|
@Binding var selection: ChatId?
|
|
@ViewBuilder var label: () -> Label
|
|
var disabled = false
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
Button("") { ItemsModel.shared.loadOpenChat(chatId) }
|
|
.disabled(disabled)
|
|
label()
|
|
}
|
|
}
|
|
}
|
|
|
|
//struct NavLinkPlain_Previews: PreviewProvider {
|
|
// static var previews: some View {
|
|
// NavLinkPlain()
|
|
// }
|
|
//}
|