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