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:
ismailgulek
2022-06-20 15:27:02 +03:00
committed by GitHub
parent 40e51fb157
commit 591f835811
17 changed files with 104 additions and 64 deletions
@@ -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)
}
}
}
}
}