LoginStore.swift 486 B

12345678910111213141516171819202122232425
  1. //
  2. // LoginStore.swift
  3. // Chat
  4. //
  5. // Created by Sergey Tarasov on 25.07.2022.
  6. //
  7. import Foundation
  8. import XMPPFramework
  9. import XMPPFrameworkSwift
  10. final class LoginStore: ObservableObject {
  11. let handler: (String, String) -> Void
  12. init(handler: @escaping (String, String) -> Void = { _, _ in }) {
  13. self.handler = handler
  14. }
  15. @Published var login: String = "test11@msg.sharix-app.org"
  16. @Published var password: String = "test11_-"
  17. func submit() {
  18. handler(login, password)
  19. }
  20. }