App polish part 2 (#1118)

- Fix sheet backgrounds in dark mode.
- Fix background colours for reaction buttons.
- Reply view layout.
- Update separator colours.
- Don't show sender name/avatar in DMs.
- Fix inconsistent line heights with formatted body text.
- Use plain text for reply
- Increase tappable size of collapsed state changes button.
- Blockquote layout and text colour.
- Tap to expand the topic in room details.
- Change the topic and security font size in room details.
- Add cancel button when inviting someone to an existing room.
- Reword Add Friends to Add People in start chat screen.
- Update compound.
This commit is contained in:
Doug
2023-06-20 18:31:40 +01:00
committed by GitHub
parent 2f091cf8d1
commit ede4ab095c
30 changed files with 141 additions and 95 deletions
@@ -26,6 +26,7 @@ struct InviteUsersScreenCoordinatorParameters {
}
enum InviteUsersScreenCoordinatorAction {
case cancel
case proceed
case invite(users: [String])
case toggleUser(UserProfileProxy)
@@ -55,12 +56,14 @@ final class InviteUsersScreenCoordinator: CoordinatorProtocol {
viewModel.actions.sink { [weak self] action in
guard let self else { return }
switch action {
case .cancel:
actionsSubject.send(.cancel)
case .proceed:
self.actionsSubject.send(.proceed)
actionsSubject.send(.proceed)
case .invite(let users):
self.actionsSubject.send(.invite(users: users))
actionsSubject.send(.invite(users: users))
case .toggleUser(let user):
self.actionsSubject.send(.toggleUser(user))
actionsSubject.send(.toggleUser(user))
}
}
.store(in: &cancellables)
@@ -22,6 +22,7 @@ enum InviteUsersScreenErrorType: Error {
}
enum InviteUsersScreenViewModelAction {
case cancel
case proceed
case invite(users: [String])
case toggleUser(UserProfileProxy)
@@ -86,6 +87,7 @@ struct InviteUsersScreenViewStateBindings {
}
enum InviteUsersScreenViewAction {
case cancel
case proceed
case toggleUser(UserProfileProxy)
}
@@ -51,6 +51,8 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
override func process(viewAction: InviteUsersScreenViewAction) {
switch viewAction {
case .cancel:
actionsSubject.send(.cancel)
case .proceed:
switch roomType {
case .draft:
@@ -26,11 +26,7 @@ struct InviteUsersScreen: View {
.scrollDismissesKeyboard(.immediately)
.navigationTitle(L10n.screenCreateRoomAddPeopleTitle)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .confirmationAction) {
nextButton
}
}
.toolbar { toolbar }
.disableInteractiveDismissOnSearch()
.dismissSearchOnDisappear()
.searchable(text: $context.searchQuery, placement: .navigationBarDrawer(displayMode: .always), prompt: L10n.commonSearchForSomeone)
@@ -123,11 +119,22 @@ struct InviteUsersScreen: View {
.frame(width: frame.width)
}
private var nextButton: some View {
Button { context.send(viewAction: .proceed) } label: {
Text(context.viewState.actionText)
@ToolbarContentBuilder
private var toolbar: some ToolbarContent {
if !context.viewState.isCreatingRoom {
ToolbarItem(placement: .cancellationAction) {
Button(L10n.actionCancel) {
context.send(viewAction: .cancel)
}
}
}
ToolbarItem(placement: .confirmationAction) {
Button(context.viewState.actionText) {
context.send(viewAction: .proceed)
}
.disabled(context.viewState.isActionDisabled)
}
.disabled(context.viewState.isActionDisabled)
}
private func deselect(_ user: UserProfileProxy) {