refactor files, auto-scrollback for messages (#256)

This commit is contained in:
Evgeny Poberezkin
2022-02-02 16:46:05 +00:00
committed by GitHub
parent 88a33990b7
commit 38424af48e
25 changed files with 118 additions and 221 deletions

View File

@@ -0,0 +1,36 @@
//
// 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()
}
}