mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 12:49:53 +00:00
* add support for user addresses * started processing contact requests * update command syntax * fix: make Profile Codable * accept/reject contact requests * update API, accept/reject contact requests
36 lines
871 B
Swift
36 lines
871 B
Swift
//
|
|
// SettingsButton.swift
|
|
// SimpleX
|
|
//
|
|
// Created by Evgeny Poberezkin on 31/01/2022.
|
|
// Copyright © 2022 SimpleX Chat. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SettingsButton: View {
|
|
@EnvironmentObject var chatModel: ChatModel
|
|
@State private var showSettings = false
|
|
|
|
var body: some View {
|
|
Button { showSettings = true } label: {
|
|
Image(systemName: "gearshape")
|
|
}
|
|
.sheet(isPresented: $showSettings, content: {
|
|
SettingsView()
|
|
.onAppear {
|
|
do {
|
|
chatModel.userAddress = try apiGetUserAddress()
|
|
} catch {
|
|
print(error)
|
|
}
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
struct SettingsButton_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
SettingsButton()
|
|
}
|
|
}
|