mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Removed unnecessary comments from RiotSwiftUI templates, fixed StateStoreViewModel typealias formatting
This commit is contained in:
committed by
Stefan Ceriu
parent
43c28d23b7
commit
fc2fdc8ae7
-8
@@ -22,25 +22,17 @@ struct TemplateUserProfileCoordinatorParameters {
|
||||
}
|
||||
|
||||
final class TemplateUserProfileCoordinator: Coordinator, Presentable {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private let parameters: TemplateUserProfileCoordinatorParameters
|
||||
private let templateUserProfileHostingController: UIViewController
|
||||
private var templateUserProfileViewModel: TemplateUserProfileViewModelProtocol
|
||||
|
||||
private var indicatorPresenter: UserIndicatorTypePresenterProtocol
|
||||
private var loadingIndicator: UserIndicator?
|
||||
|
||||
// MARK: Public
|
||||
|
||||
// Must be used only internally
|
||||
var childCoordinators: [Coordinator] = []
|
||||
var completion: (() -> Void)?
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
init(parameters: TemplateUserProfileCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
let viewModel = TemplateUserProfileViewModel.makeTemplateUserProfileViewModel(templateUserProfileService: TemplateUserProfileService(session: parameters.session))
|
||||
|
||||
-8
@@ -18,15 +18,9 @@ import Combine
|
||||
import Foundation
|
||||
|
||||
class TemplateUserProfileService: TemplateUserProfileServiceProtocol {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private let session: MXSession
|
||||
private var listenerReference: Any?
|
||||
|
||||
// MARK: Public
|
||||
|
||||
var userId: String {
|
||||
session.myUser.userId
|
||||
}
|
||||
@@ -41,8 +35,6 @@ class TemplateUserProfileService: TemplateUserProfileServiceProtocol {
|
||||
|
||||
private(set) var presenceSubject: CurrentValueSubject<TemplateUserProfilePresence, Never>
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
init(session: MXSession) {
|
||||
self.session = session
|
||||
presenceSubject = CurrentValueSubject(TemplateUserProfilePresence(mxPresence: session.myUser.presence))
|
||||
|
||||
+1
-11
@@ -17,23 +17,13 @@
|
||||
import Combine
|
||||
import SwiftUI
|
||||
|
||||
typealias TemplateUserProfileViewModelType = StateStoreViewModel<TemplateUserProfileViewState,
|
||||
Never,
|
||||
TemplateUserProfileViewAction>
|
||||
typealias TemplateUserProfileViewModelType = StateStoreViewModel<TemplateUserProfileViewState, Never, TemplateUserProfileViewAction>
|
||||
|
||||
class TemplateUserProfileViewModel: TemplateUserProfileViewModelType, TemplateUserProfileViewModelProtocol {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private let templateUserProfileService: TemplateUserProfileServiceProtocol
|
||||
|
||||
// MARK: Public
|
||||
|
||||
var completion: ((TemplateUserProfileViewModelResult) -> Void)?
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
static func makeTemplateUserProfileViewModel(templateUserProfileService: TemplateUserProfileServiceProtocol) -> TemplateUserProfileViewModelProtocol {
|
||||
TemplateUserProfileViewModel(templateUserProfileService: templateUserProfileService)
|
||||
}
|
||||
|
||||
@@ -17,14 +17,8 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TemplateUserProfile: View {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@Environment(\.theme) private var theme: ThemeSwiftUI
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@ObservedObject var viewModel: TemplateUserProfileViewModel.Context
|
||||
|
||||
var body: some View {
|
||||
|
||||
-6
@@ -17,13 +17,7 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TemplateUserProfileHeader: View {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@Environment(\.theme) private var theme: ThemeSwiftUI
|
||||
|
||||
// MARK: Public
|
||||
|
||||
let avatar: AvatarInputProtocol?
|
||||
let displayName: String?
|
||||
|
||||
-4
@@ -17,10 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TemplateUserProfilePresenceView: View {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Public
|
||||
|
||||
let presence: TemplateUserProfilePresence
|
||||
|
||||
var body: some View {
|
||||
|
||||
Reference in New Issue
Block a user