mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +00:00
Finalize classes
This commit is contained in:
parent
b4549521cb
commit
17506f5bd9
18 changed files with 18 additions and 18 deletions
|
@ -3,7 +3,7 @@
|
||||||
import CodableBloomFilter
|
import CodableBloomFilter
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
class UserDefaultsClient {
|
final class UserDefaultsClient {
|
||||||
private let userDefaults: UserDefaults
|
private let userDefaults: UserDefaults
|
||||||
|
|
||||||
init(userDefaults: UserDefaults) {
|
init(userDefaults: UserDefaults) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import Combine
|
import Combine
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
class AppDelegate: NSObject {
|
final class AppDelegate: NSObject {
|
||||||
@Published private var application: UIApplication?
|
@Published private var application: UIApplication?
|
||||||
private let remoteNotificationDeviceTokens = PassthroughSubject<Data, Error>()
|
private let remoteNotificationDeviceTokens = PassthroughSubject<Data, Error>()
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Combine
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import ViewModels
|
import ViewModels
|
||||||
|
|
||||||
class StatusListViewController: UITableViewController {
|
final class StatusListViewController: UITableViewController {
|
||||||
private let viewModel: StatusListViewModel
|
private let viewModel: StatusListViewModel
|
||||||
private let loadingTableFooterView = LoadingTableFooterView()
|
private let loadingTableFooterView = LoadingTableFooterView()
|
||||||
private var cancellables = Set<AnyCancellable>()
|
private var cancellables = Set<AnyCancellable>()
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Combine
|
||||||
import Foundation
|
import Foundation
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class AddIdentityViewModel: ObservableObject {
|
public final class AddIdentityViewModel: ObservableObject {
|
||||||
@Published public var urlFieldText = ""
|
@Published public var urlFieldText = ""
|
||||||
@Published public var alertItem: AlertItem?
|
@Published public var alertItem: AlertItem?
|
||||||
@Published public private(set) var loading = false
|
@Published public private(set) var loading = false
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class EditFilterViewModel: ObservableObject {
|
public final class EditFilterViewModel: ObservableObject {
|
||||||
@Published public var filter: Filter
|
@Published public var filter: Filter
|
||||||
@Published public var saving = false
|
@Published public var saving = false
|
||||||
@Published public var alertItem: AlertItem?
|
@Published public var alertItem: AlertItem?
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class FiltersViewModel: ObservableObject {
|
public final class FiltersViewModel: ObservableObject {
|
||||||
@Published public var activeFilters = [Filter]()
|
@Published public var activeFilters = [Filter]()
|
||||||
@Published public var expiredFilters = [Filter]()
|
@Published public var expiredFilters = [Filter]()
|
||||||
@Published public var alertItem: AlertItem?
|
@Published public var alertItem: AlertItem?
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Combine
|
||||||
import Foundation
|
import Foundation
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class IdentitiesViewModel: ObservableObject {
|
public final class IdentitiesViewModel: ObservableObject {
|
||||||
public let currentIdentityID: UUID
|
public let currentIdentityID: UUID
|
||||||
@Published public var identities = [Identity]()
|
@Published public var identities = [Identity]()
|
||||||
@Published public var alertItem: AlertItem?
|
@Published public var alertItem: AlertItem?
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class ListsViewModel: ObservableObject {
|
public final class ListsViewModel: ObservableObject {
|
||||||
@Published public private(set) var lists = [MastodonList]()
|
@Published public private(set) var lists = [MastodonList]()
|
||||||
@Published public private(set) var creatingList = false
|
@Published public private(set) var creatingList = false
|
||||||
@Published public var alertItem: AlertItem?
|
@Published public var alertItem: AlertItem?
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class NotificationTypesPreferencesViewModel: ObservableObject {
|
public final class NotificationTypesPreferencesViewModel: ObservableObject {
|
||||||
@Published public var pushSubscriptionAlerts: PushSubscription.Alerts
|
@Published public var pushSubscriptionAlerts: PushSubscription.Alerts
|
||||||
@Published public var alertItem: AlertItem?
|
@Published public var alertItem: AlertItem?
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Combine
|
||||||
import Foundation
|
import Foundation
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class PostingReadingPreferencesViewModel: ObservableObject {
|
public final class PostingReadingPreferencesViewModel: ObservableObject {
|
||||||
@Published public var preferences: Identity.Preferences
|
@Published public var preferences: Identity.Preferences
|
||||||
@Published public var alertItem: AlertItem?
|
@Published public var alertItem: AlertItem?
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class PreferencesViewModel: ObservableObject {
|
public final class PreferencesViewModel: ObservableObject {
|
||||||
public let handle: String
|
public let handle: String
|
||||||
public let shouldShowNotificationTypePreferences: Bool
|
public let shouldShowNotificationTypePreferences: Bool
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class StatusListViewModel: ObservableObject {
|
public final class StatusListViewModel: ObservableObject {
|
||||||
@Published public private(set) var statusIDs = [[String]]()
|
@Published public private(set) var statusIDs = [[String]]()
|
||||||
@Published public var alertItem: AlertItem?
|
@Published public var alertItem: AlertItem?
|
||||||
@Published public private(set) var loading = false
|
@Published public private(set) var loading = false
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Foundation
|
||||||
import Mastodon
|
import Mastodon
|
||||||
import ServiceLayer
|
import ServiceLayer
|
||||||
|
|
||||||
public class TabNavigationViewModel: ObservableObject {
|
public final class TabNavigationViewModel: ObservableObject {
|
||||||
@Published public private(set) var identity: Identity
|
@Published public private(set) var identity: Identity
|
||||||
@Published public private(set) var recentIdentities = [Identity]()
|
@Published public private(set) var recentIdentities = [Identity]()
|
||||||
@Published public var timeline = Timeline.home
|
@Published public var timeline = Timeline.home
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Kingfisher
|
||||||
import UIKit
|
import UIKit
|
||||||
import ViewModels
|
import ViewModels
|
||||||
|
|
||||||
class AttachmentView: UIView {
|
final class AttachmentView: UIView {
|
||||||
let imageView = AnimatedImageView()
|
let imageView = AnimatedImageView()
|
||||||
let button = UIButton()
|
let button = UIButton()
|
||||||
let viewModel: AttachmentViewModel
|
let viewModel: AttachmentViewModel
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import UIKit
|
import UIKit
|
||||||
import ViewModels
|
import ViewModels
|
||||||
|
|
||||||
class AttachmentsView: UIView {
|
final class AttachmentsView: UIView {
|
||||||
private let containerStackView = UIStackView()
|
private let containerStackView = UIStackView()
|
||||||
private let leftStackView = UIStackView()
|
private let leftStackView = UIStackView()
|
||||||
private let rightStackView = UIStackView()
|
private let rightStackView = UIStackView()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
class LoadingTableFooterView: UIView {
|
final class LoadingTableFooterView: UIView {
|
||||||
let activityIndicatorView = UIActivityIndicatorView()
|
let activityIndicatorView = UIActivityIndicatorView()
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ protocol StatusTableViewCellDelegate: class {
|
||||||
func statusTableViewCellDidHaveShareButtonTapped(_ cell: StatusTableViewCell)
|
func statusTableViewCellDidHaveShareButtonTapped(_ cell: StatusTableViewCell)
|
||||||
}
|
}
|
||||||
|
|
||||||
class StatusTableViewCell: UITableViewCell {
|
final class StatusTableViewCell: UITableViewCell {
|
||||||
@IBOutlet weak var metaIcon: UIImageView!
|
@IBOutlet weak var metaIcon: UIImageView!
|
||||||
@IBOutlet weak var metaLabel: UILabel!
|
@IBOutlet weak var metaLabel: UILabel!
|
||||||
@IBOutlet weak var contentTextView: TouchFallthroughTextView!
|
@IBOutlet weak var contentTextView: TouchFallthroughTextView!
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
class TouchFallthroughTextView: UITextView {
|
final class TouchFallthroughTextView: UITextView {
|
||||||
var shouldFallthrough: Bool = true
|
var shouldFallthrough: Bool = true
|
||||||
|
|
||||||
override init(frame: CGRect, textContainer: NSTextContainer?) {
|
override init(frame: CGRect, textContainer: NSTextContainer?) {
|
||||||
|
|
Loading…
Reference in a new issue