mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Minimal Settings screen UI (#85)
* #37 Remove sign out button from home screen * #37 Move crash button visibility flag to BuildSettings, import BuildSettings from test targets * #37 Add log out button into the settings screen * #37 Add version into the settings screen * #37 enhance bug report parameters * #37 Remove sign out button from home screen * #37 Move crash button visibility flag to BuildSettings, import BuildSettings from test targets * #37 Add log out button into the settings screen * #37 Add version into the settings screen * #37 enhance bug report parameters * #37 Add changelog * #37 Fix code smells and PR remarks
This commit is contained in:
@@ -24,7 +24,6 @@ struct HomeScreenCoordinatorParameters {
|
||||
}
|
||||
|
||||
enum HomeScreenCoordinatorAction {
|
||||
case logout
|
||||
case presentRoom(roomIdentifier: String)
|
||||
case presentSettings
|
||||
}
|
||||
@@ -63,8 +62,6 @@ final class HomeScreenCoordinator: Coordinator, Presentable {
|
||||
guard let self = self else { return }
|
||||
|
||||
switch action {
|
||||
case .logout:
|
||||
self.callback?(.logout)
|
||||
case .selectRoom(let roomIdentifier):
|
||||
self.callback?(.presentRoom(roomIdentifier: roomIdentifier))
|
||||
case .tapUserAvatar:
|
||||
|
||||
@@ -18,13 +18,11 @@ import Foundation
|
||||
import UIKit
|
||||
|
||||
enum HomeScreenViewModelAction {
|
||||
case logout
|
||||
case selectRoom(roomIdentifier: String)
|
||||
case tapUserAvatar
|
||||
}
|
||||
|
||||
enum HomeScreenViewAction {
|
||||
case logout
|
||||
case loadRoomData(roomIdentifier: String)
|
||||
case selectRoom(roomIdentifier: String)
|
||||
case tapUserAvatar
|
||||
|
||||
@@ -45,8 +45,6 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
|
||||
override func process(viewAction: HomeScreenViewAction) async {
|
||||
switch viewAction {
|
||||
case .logout:
|
||||
callback?(.logout)
|
||||
case .loadRoomData(let roomIdentifier):
|
||||
loadRoomDataForIdentifier(roomIdentifier)
|
||||
case .selectRoom(let roomIdentifier):
|
||||
|
||||
@@ -106,11 +106,6 @@ struct HomeScreen: View {
|
||||
.transition(.opacity)
|
||||
}
|
||||
}
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
Button("Logout") {
|
||||
context.send(viewAction: .logout)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user