Finalize classes

This commit is contained in:
Justin Mazzocchi 2020-09-07 19:35:28 -07:00
parent b4549521cb
commit 17506f5bd9
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
18 changed files with 18 additions and 18 deletions

View File

@ -3,7 +3,7 @@
import CodableBloomFilter
import Foundation
class UserDefaultsClient {
final class UserDefaultsClient {
private let userDefaults: UserDefaults
init(userDefaults: UserDefaults) {

View File

@ -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>()
}

View File

@ -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>()

View File

@ -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

View File

@ -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?

View File

@ -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?

View File

@ -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?

View File

@ -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?

View File

@ -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?

View File

@ -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?

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -2,7 +2,7 @@
import UIKit
class LoadingTableFooterView: UIView {
final class LoadingTableFooterView: UIView {
let activityIndicatorView = UIActivityIndicatorView()
override init(frame: CGRect) {

View File

@ -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!

View File

@ -2,7 +2,7 @@
import UIKit
class TouchFallthroughTextView: UITextView {
final class TouchFallthroughTextView: UITextView {
var shouldFallthrough: Bool = true
override init(frame: CGRect, textContainer: NSTextContainer?) {