mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Enable blank line rules. (#132)
This commit is contained in:
@@ -16,7 +16,6 @@ protocol AuthenticationCoordinatorDelegate: AnyObject {
|
||||
}
|
||||
|
||||
class AuthenticationCoordinator: Coordinator, Presentable {
|
||||
|
||||
private let authenticationService: AuthenticationServiceProtocol
|
||||
private let navigationRouter: NavigationRouter
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import SwiftUI
|
||||
|
||||
/// An image that is styled for use as the screen icon in the onboarding flow.
|
||||
struct AuthenticationIconImage: View {
|
||||
|
||||
let image: ImageAsset
|
||||
|
||||
var body: some View {
|
||||
|
||||
@@ -32,7 +32,6 @@ enum LoginCoordinatorAction {
|
||||
}
|
||||
|
||||
final class LoginCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -85,5 +85,4 @@ extension LoginHomeserver {
|
||||
isMatrixDotOrg: false,
|
||||
loginMode: .unsupported)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import SwiftUI
|
||||
typealias LoginViewModelType = StateStoreViewModel<LoginViewState, LoginViewAction>
|
||||
|
||||
class LoginViewModel: LoginViewModelType, LoginViewModelProtocol {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@@ -18,7 +18,6 @@ import Foundation
|
||||
|
||||
@MainActor
|
||||
protocol LoginViewModelProtocol {
|
||||
|
||||
var callback: (@MainActor(LoginViewModelAction) -> Void)? { get set }
|
||||
var context: LoginViewModelType.Context { get }
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct LoginScreen: View {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
@@ -54,7 +53,6 @@ struct LoginScreen: View {
|
||||
default:
|
||||
loginUnavailableText
|
||||
}
|
||||
|
||||
}
|
||||
.readableFrame()
|
||||
.padding(.horizontal, 16)
|
||||
|
||||
@@ -19,7 +19,6 @@ import SwiftUI
|
||||
/// A view that shows information about the chosen homeserver,
|
||||
/// along with an edit button to pick a different one.
|
||||
struct LoginServerInfoSection: View {
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
/// The address shown for the server.
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ enum ServerSelectionCoordinatorAction {
|
||||
}
|
||||
|
||||
final class ServerSelectionCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -19,7 +19,6 @@ import SwiftUI
|
||||
typealias ServerSelectionViewModelType = StateStoreViewModel<ServerSelectionViewState, ServerSelectionViewAction>
|
||||
|
||||
class ServerSelectionViewModel: ServerSelectionViewModelType, ServerSelectionViewModelProtocol {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
-1
@@ -18,7 +18,6 @@ import Foundation
|
||||
|
||||
@MainActor
|
||||
protocol ServerSelectionViewModelProtocol {
|
||||
|
||||
var callback: (@MainActor(ServerSelectionViewModelAction) -> Void)? { get set }
|
||||
var context: ServerSelectionViewModelType.Context { get }
|
||||
|
||||
|
||||
-1
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct ServerSelectionScreen: View {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -22,7 +22,6 @@ struct BugReportCoordinatorParameters {
|
||||
}
|
||||
|
||||
final class BugReportCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -21,7 +21,6 @@ typealias BugReportViewModelType = StateStoreViewModel<BugReportViewState,
|
||||
BugReportViewAction>
|
||||
@available(iOS 14, *)
|
||||
class BugReportViewModel: BugReportViewModelType, BugReportViewModelProtocol {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
let bugReportService: BugReportServiceProtocol
|
||||
|
||||
@@ -18,7 +18,6 @@ import Foundation
|
||||
|
||||
@MainActor
|
||||
protocol BugReportViewModelProtocol {
|
||||
|
||||
var callback: ((BugReportViewModelAction) -> Void)? { get set }
|
||||
@available(iOS 14, *)
|
||||
var context: BugReportViewModelType.Context { get }
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct BugReportScreen: View {
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
||||
|
||||
@@ -30,7 +30,6 @@ enum HomeScreenCoordinatorAction {
|
||||
}
|
||||
|
||||
final class HomeScreenCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -20,7 +20,6 @@ import SwiftUI
|
||||
typealias HomeScreenViewModelType = StateStoreViewModel<HomeScreenViewState, HomeScreenViewAction>
|
||||
|
||||
class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol {
|
||||
|
||||
private let attributedStringBuilder: AttributedStringBuilderProtocol
|
||||
|
||||
private var roomUpdateListeners = Set<AnyCancellable>()
|
||||
@@ -82,7 +81,6 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
}
|
||||
.store(in: &roomUpdateListeners)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func updateWithUserAvatar(_ avatar: UIImage) {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct HomeScreen: View {
|
||||
|
||||
@ObservedObject var context: HomeScreenViewModel.Context
|
||||
|
||||
// MARK: Views
|
||||
@@ -30,7 +29,6 @@ struct HomeScreen: View {
|
||||
ProgressView()
|
||||
}
|
||||
} else {
|
||||
|
||||
if context.viewState.showSessionVerificationBanner {
|
||||
HStack {
|
||||
Text(ElementL10n.verificationVerifyDevice)
|
||||
@@ -115,7 +113,6 @@ struct HomeScreen: View {
|
||||
}
|
||||
|
||||
struct RoomCell: View {
|
||||
|
||||
@ScaledMetric private var avatarSize = 32.0
|
||||
|
||||
let room: HomeScreenRoom
|
||||
|
||||
@@ -24,7 +24,6 @@ struct RoomScreenCoordinatorParameters {
|
||||
}
|
||||
|
||||
final class RoomScreenCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -19,7 +19,6 @@ import SwiftUI
|
||||
typealias RoomScreenViewModelType = StateStoreViewModel<RoomScreenViewState, RoomScreenViewAction>
|
||||
|
||||
class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol {
|
||||
|
||||
private enum Constants {
|
||||
static let backPaginationPageSize: UInt = 30
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import Combine
|
||||
import UIKit
|
||||
|
||||
class ListTableViewAdapter: NSObject, UITableViewDelegate {
|
||||
|
||||
private enum ContentOffsetDetails {
|
||||
case topOffset(previousVisibleIndexPath: IndexPath, previousItemCount: Int)
|
||||
case bottomOffset
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct MessageComposer: View {
|
||||
|
||||
@Binding var text: String
|
||||
var disabled: Bool
|
||||
let action: () -> Void
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct MessageComposerTextField: View {
|
||||
|
||||
@Binding private var text: String
|
||||
@State private var dynamicHeight: CGFloat = 100
|
||||
@State private var isEditing = false
|
||||
|
||||
@@ -13,7 +13,6 @@ import SwiftUI
|
||||
import Introspect
|
||||
|
||||
struct RoomHeaderView: View {
|
||||
|
||||
@ObservedObject var context: RoomScreenViewModel.Context
|
||||
|
||||
var body: some View {
|
||||
@@ -49,7 +48,6 @@ struct RoomHeaderView: View {
|
||||
.accessibilityIdentifier("roomAvatarPlaceholderImage")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct RoomHeaderView_Previews: PreviewProvider {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct RoomScreen: View {
|
||||
|
||||
@ObservedObject var context: RoomScreenViewModel.Context
|
||||
|
||||
var body: some View {
|
||||
|
||||
@@ -10,7 +10,6 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
|
||||
let timelineItem: EventBasedTimelineItemProtocol
|
||||
@ViewBuilder let content: () -> Content
|
||||
|
||||
@@ -96,7 +95,6 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
let opacity = colorScheme == .light ? 0.06 : 0.15
|
||||
return timelineItem.isOutgoing ? .element.accent.opacity(opacity) : .element.system
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct TimelineItemBubbledStylerView_Previews: PreviewProvider {
|
||||
|
||||
@@ -10,7 +10,6 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct TimelineItemPlainStylerView<Content: View>: View {
|
||||
|
||||
let timelineItem: EventBasedTimelineItemProtocol
|
||||
@ViewBuilder let content: () -> Content
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ struct FormattedBodyText_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
body.preferredColorScheme(.light)
|
||||
body.preferredColorScheme(.dark)
|
||||
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct PlaceholderAvatarImage: View {
|
||||
|
||||
private let textForImage: String
|
||||
|
||||
var body: some View {
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
import SwiftUI
|
||||
|
||||
public struct TimelineItemContextMenu: View {
|
||||
|
||||
let contextMenuActions: [TimelineItemContextMenuAction]
|
||||
let callback: (TimelineItemContextMenuAction) -> Void
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import Introspect
|
||||
import SwiftUI
|
||||
|
||||
struct TimelineItemList: View {
|
||||
|
||||
@State private var tableViewObserver = ListTableViewAdapter()
|
||||
@State private var timelineItems: [RoomTimelineViewProvider] = []
|
||||
@State private var hasPendingChanges = false
|
||||
|
||||
@@ -10,7 +10,6 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct TimelineSenderAvatarView: View {
|
||||
|
||||
let timelineItem: EventBasedTimelineItemProtocol
|
||||
|
||||
@ScaledMetric private var avatarSize = 26
|
||||
@@ -35,5 +34,4 @@ struct TimelineSenderAvatarView: View {
|
||||
|
||||
.animation(.default, value: timelineItem.senderAvatar)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import SwiftUI
|
||||
import Introspect
|
||||
|
||||
struct TimelineView: View {
|
||||
|
||||
@State private var bottomVisiblePublisher = PassthroughSubject<Bool, Never>()
|
||||
@State private var scrollToBottomPublisher = PassthroughSubject<Void, Never>()
|
||||
@State private var scollToBottomButtonVisible = false
|
||||
|
||||
@@ -21,7 +21,6 @@ struct SessionVerificationCoordinatorParameters {
|
||||
}
|
||||
|
||||
final class SessionVerificationCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -19,7 +19,6 @@ import SwiftUI
|
||||
typealias SessionVerificationViewModelType = StateStoreViewModel<SessionVerificationViewState, SessionVerificationViewAction>
|
||||
|
||||
class SessionVerificationViewModel: SessionVerificationViewModelType, SessionVerificationViewModelProtocol {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
@@ -36,7 +35,6 @@ class SessionVerificationViewModel: SessionVerificationViewModelType, SessionVer
|
||||
|
||||
init(sessionVerificationControllerProxy: SessionVerificationControllerProxyProtocol,
|
||||
initialState: SessionVerificationViewState = SessionVerificationViewState()) {
|
||||
|
||||
self.sessionVerificationControllerProxy = sessionVerificationControllerProxy
|
||||
|
||||
stateMachine = SessionVerificationStateMachine()
|
||||
|
||||
@@ -18,7 +18,6 @@ import MatrixRustSDK
|
||||
import SwiftUI
|
||||
|
||||
struct SessionVerificationScreen: View {
|
||||
|
||||
@ObservedObject var context: SessionVerificationViewModel.Context
|
||||
|
||||
// MARK: Views
|
||||
|
||||
@@ -26,7 +26,6 @@ enum SettingsCoordinatorAction {
|
||||
}
|
||||
|
||||
final class SettingsCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -21,7 +21,6 @@ typealias SettingsViewModelType = StateStoreViewModel<SettingsViewState,
|
||||
SettingsViewAction>
|
||||
@available(iOS 14, *)
|
||||
class SettingsViewModel: SettingsViewModelType, SettingsViewModelProtocol {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -18,7 +18,6 @@ import Foundation
|
||||
|
||||
@MainActor
|
||||
protocol SettingsViewModelProtocol {
|
||||
|
||||
var callback: ((SettingsViewModelAction) -> Void)? { get set }
|
||||
@available(iOS 14, *)
|
||||
var context: SettingsViewModelType.Context { get }
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SettingsScreen: View {
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@State private var showingLogoutConfirmation = false
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
final class SplashScreenCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -38,7 +38,6 @@ enum SplashScreenViewModelAction {
|
||||
// MARK: View
|
||||
|
||||
struct SplashScreenViewState: BindableState {
|
||||
|
||||
/// The colours of the background gradient shown behind the 4 pages.
|
||||
private let gradientColors = [
|
||||
Color(red: 0.95, green: 0.98, blue: 0.96),
|
||||
|
||||
@@ -20,7 +20,6 @@ import SwiftUI
|
||||
typealias SplashScreenViewModelType = StateStoreViewModel<SplashScreenViewState, SplashScreenViewAction>
|
||||
|
||||
class SplashScreenViewModel: SplashScreenViewModelType, SplashScreenViewModelProtocol {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -19,7 +19,6 @@ import SwiftUI
|
||||
|
||||
/// The splash screen shown at the beginning of the onboarding flow.
|
||||
struct SplashScreen: View {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
@@ -47,7 +46,6 @@ struct SplashScreen: View {
|
||||
|
||||
// The main content of the carousel
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
|
||||
// Add a hidden page at the start of the carousel duplicating the content of the last page
|
||||
SplashScreenPageView(content: context.viewState.content[pageCount - 1])
|
||||
.frame(width: geometry.size.width)
|
||||
@@ -57,7 +55,6 @@ struct SplashScreen: View {
|
||||
SplashScreenPageView(content: context.viewState.content[index])
|
||||
.frame(width: geometry.size.width)
|
||||
}
|
||||
|
||||
}
|
||||
.offset(x: pageOffset(in: geometry))
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SplashScreenPageIndicator: View {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SplashScreenPageView: View {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Public
|
||||
|
||||
Reference in New Issue
Block a user