mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Removing the about section title + Fix notification tap crash (#778)
* Removing the about section title updated tests * fixed a bug that made the app crash when tapping a notification in an unhandled state * missing screenshots
This commit is contained in:
parent
cabb8e5442
commit
f02a5c7ac0
@ -476,7 +476,7 @@ extension AppCoordinator: NotificationManagerDelegate {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
userSessionFlowCoordinator?.tryDisplayingRoomScreen(roomId: content.threadIdentifier)
|
userSessionFlowCoordinator?.handleAppRoute(.room(roomID: content.threadIdentifier))
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleInlineReply(_ service: NotificationManagerProtocol, content: UNNotificationContent, replyText: String) async {
|
func handleInlineReply(_ service: NotificationManagerProtocol, content: UNNotificationContent, replyText: String) async {
|
||||||
|
21
ElementX/Sources/Application/Navigation/AppRouter.swift
Normal file
21
ElementX/Sources/Application/Navigation/AppRouter.swift
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2023 New Vector Ltd
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
enum AppRoute {
|
||||||
|
case room(roomID: String)
|
||||||
|
}
|
@ -33,9 +33,7 @@ struct RoomDetailsScreen: View {
|
|||||||
aboutSection
|
aboutSection
|
||||||
}
|
}
|
||||||
|
|
||||||
if context.viewState.isEncrypted {
|
securitySection
|
||||||
securitySection
|
|
||||||
}
|
|
||||||
|
|
||||||
if let recipient = context.viewState.dmRecipient {
|
if let recipient = context.viewState.dmRecipient {
|
||||||
ignoreUserSection(user: recipient)
|
ignoreUserSection(user: recipient)
|
||||||
@ -134,31 +132,31 @@ struct RoomDetailsScreen: View {
|
|||||||
.foregroundColor(.element.primaryContent)
|
.foregroundColor(.element.primaryContent)
|
||||||
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.people)
|
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.people)
|
||||||
.disabled(context.viewState.isLoadingMembers)
|
.disabled(context.viewState.isLoadingMembers)
|
||||||
} header: {
|
|
||||||
Text(L10n.commonAbout)
|
|
||||||
.formSectionHeader()
|
|
||||||
}
|
}
|
||||||
.formSectionStyle()
|
.formSectionStyle()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
private var securitySection: some View {
|
private var securitySection: some View {
|
||||||
Section {
|
if context.viewState.isEncrypted {
|
||||||
Label {
|
Section {
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
Label {
|
||||||
Text(L10n.screenRoomDetailsEncryptionEnabledTitle)
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
Text(L10n.screenRoomDetailsEncryptionEnabledSubtitle)
|
Text(L10n.screenRoomDetailsEncryptionEnabledTitle)
|
||||||
.foregroundColor(.element.secondaryContent)
|
Text(L10n.screenRoomDetailsEncryptionEnabledSubtitle)
|
||||||
.font(.element.footnote)
|
.foregroundColor(.element.secondaryContent)
|
||||||
|
.font(.element.footnote)
|
||||||
|
}
|
||||||
|
} icon: {
|
||||||
|
Image(systemName: "lock.shield")
|
||||||
}
|
}
|
||||||
} icon: {
|
.labelStyle(FormRowLabelStyle(alignment: .top))
|
||||||
Image(systemName: "lock.shield")
|
} header: {
|
||||||
|
Text(L10n.commonSecurity)
|
||||||
|
.formSectionHeader()
|
||||||
}
|
}
|
||||||
.labelStyle(FormRowLabelStyle(alignment: .top))
|
.formSectionStyle()
|
||||||
} header: {
|
|
||||||
Text(L10n.commonSecurity)
|
|
||||||
.formSectionHeader()
|
|
||||||
}
|
}
|
||||||
.formSectionStyle()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var leaveRoomSection: some View {
|
private var leaveRoomSection: some View {
|
||||||
|
@ -62,8 +62,17 @@ class UserSessionFlowCoordinator: CoordinatorProtocol {
|
|||||||
stateMachine.isDisplayingRoomScreen(withRoomId: roomId)
|
stateMachine.isDisplayingRoomScreen(withRoomId: roomId)
|
||||||
}
|
}
|
||||||
|
|
||||||
func tryDisplayingRoomScreen(roomId: String) {
|
func handleAppRoute(_ appRoute: AppRoute) {
|
||||||
stateMachine.processEvent(.selectRoom(roomId: roomId))
|
switch stateMachine.state {
|
||||||
|
case .feedbackScreen, .sessionVerificationScreen, .settingsScreen, .startChatScreen:
|
||||||
|
navigationSplitCoordinator.setSheetCoordinator(nil)
|
||||||
|
case .roomList, .initial:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
switch appRoute {
|
||||||
|
case .room(let roomID):
|
||||||
|
stateMachine.processEvent(.selectRoom(roomId: roomID))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Private
|
// MARK: - Private
|
||||||
|
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreen.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreen.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreen.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreen.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreen.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreen.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreen.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreen.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
Binary file not shown.
1
changelog.d/777.change
Normal file
1
changelog.d/777.change
Normal file
@ -0,0 +1 @@
|
|||||||
|
Removed the about title copy from the people section.
|
1
changelog.d/779.bugfix
Normal file
1
changelog.d/779.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fixed a bug that crashed the app when tapping on push notifications while the app was in some specific unhandled screens.
|
Loading…
x
Reference in New Issue
Block a user