ios: settings to auto-accept contact requests (#1246)

* ios: settings to auto-accept contact requests

* use NavigationView

* fix share sheet, layout

* move buttons
This commit is contained in:
Evgeny Poberezkin
2022-10-24 11:25:36 +01:00
committed by GitHub
parent 15c1f9f9c8
commit 5265667c0c
8 changed files with 191 additions and 20 deletions

View File

@@ -726,6 +726,11 @@ public struct AutoAccept: Codable {
public var acceptIncognito: Bool
public var autoReply: MsgContent?
public init(acceptIncognito: Bool, autoReply: MsgContent? = nil) {
self.acceptIncognito = acceptIncognito
self.autoReply = autoReply
}
static func cmdString(_ autoAccept: AutoAccept?) -> String {
guard let autoAccept = autoAccept else { return "off" }
let s = "on" + (autoAccept.acceptIncognito ? " incognito=on" : "")

View File

@@ -1199,7 +1199,7 @@ public enum MsgContent {
// TODO include original JSON, possibly using https://github.com/zoul/generic-json-swift
case unknown(type: String, text: String)
var text: String {
public var text: String {
get {
switch self {
case let .text(text): return text