2021-02-24 13:06:28 +01:00
|
|
|
//
|
|
|
|
// MastodonResendEmailViewModel.swift
|
|
|
|
// Mastodon
|
|
|
|
//
|
|
|
|
// Created by sxiaojian on 2021/2/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Combine
|
|
|
|
import Foundation
|
|
|
|
import os.log
|
|
|
|
import WebKit
|
|
|
|
|
|
|
|
final class MastodonResendEmailViewModel {
|
2021-02-26 11:27:47 +01:00
|
|
|
|
2021-02-24 13:06:28 +01:00
|
|
|
// input
|
|
|
|
let resendEmailURL: URL
|
|
|
|
let email: String
|
|
|
|
|
2021-02-25 08:39:48 +01:00
|
|
|
private var navigationDelegateShim: MastodonResendEmailViewModelNavigationDelegateShim?
|
|
|
|
|
2021-02-24 13:06:28 +01:00
|
|
|
init(resendEmailURL: URL, email: String) {
|
|
|
|
self.resendEmailURL = resendEmailURL
|
|
|
|
self.email = email
|
|
|
|
}
|
|
|
|
|
|
|
|
deinit {
|
|
|
|
os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", (#file as NSString).lastPathComponent, #line, #function)
|
|
|
|
}
|
2021-02-26 11:27:47 +01:00
|
|
|
|
2021-02-24 13:06:28 +01:00
|
|
|
}
|
2021-02-25 08:39:48 +01:00
|
|
|
extension MastodonResendEmailViewModel {
|
|
|
|
|
|
|
|
var navigationDelegate: WKNavigationDelegate {
|
|
|
|
let navigationDelegateShim = MastodonResendEmailViewModelNavigationDelegateShim(viewModel: self)
|
|
|
|
self.navigationDelegateShim = navigationDelegateShim
|
|
|
|
return navigationDelegateShim
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|