Use Compound ListRow instead of Compound form styles. (#1484)

* Adopt ListRow Component.

* Update snapshots.

To check in future PR:
- Pseudo Bug Report Attach Screenshot label
- Bug Report screenshot padding (Use ListRow .custom?)
- De-bold Analytics & Notification Settings footer links
- Inline picker alignment perhaps?

* Changelog

* Update Compound.

* Use the label on the login screen.
This commit is contained in:
Doug
2023-08-16 16:08:30 +01:00
committed by GitHub
parent 7c69012667
commit c64fb44c96
98 changed files with 499 additions and 557 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ let package = Package(
.library(name: "DesignKit", targets: ["DesignKit"]) .library(name: "DesignKit", targets: ["DesignKit"])
], ],
dependencies: [ dependencies: [
.package(url: "https://github.com/vector-im/compound-ios", revision: "89e3ed5adef33be7eb65137b861833ffae64f961"), .package(url: "https://github.com/vector-im/compound-ios", revision: "50bb7cf313bd1ad17201fc7e4c1184737a0f44c2"),
.package(url: "https://github.com/vector-im/element-design-tokens", exact: "0.0.3"), .package(url: "https://github.com/vector-im/element-design-tokens", exact: "0.0.3"),
.package(url: "https://github.com/siteline/SwiftUI-Introspect", from: "0.9.0") .package(url: "https://github.com/siteline/SwiftUI-Introspect", from: "0.9.0")
], ],
+1 -1
View File
@@ -5475,7 +5475,7 @@
repositoryURL = "https://github.com/vector-im/compound-ios"; repositoryURL = "https://github.com/vector-im/compound-ios";
requirement = { requirement = {
kind = revision; kind = revision;
revision = 89e3ed5adef33be7eb65137b861833ffae64f961; revision = 50bb7cf313bd1ad17201fc7e4c1184737a0f44c2;
}; };
}; };
9A472EE0218FE7DCF5283429 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = { 9A472EE0218FE7DCF5283429 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = {
@@ -5,7 +5,7 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/vector-im/compound-design-tokens.git", "location" : "https://github.com/vector-im/compound-design-tokens.git",
"state" : { "state" : {
"revision" : "aa55111d94486acbfd3344cf4d08b64723bd6703" "revision" : "387d2b7211f07761c67e849c59414a1bb803defa"
} }
}, },
{ {
@@ -13,7 +13,7 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/vector-im/compound-ios", "location" : "https://github.com/vector-im/compound-ios",
"state" : { "state" : {
"revision" : "89e3ed5adef33be7eb65137b861833ffae64f961" "revision" : "50bb7cf313bd1ad17201fc7e4c1184737a0f44c2"
} }
}, },
{ {
@@ -151,6 +151,15 @@
"version" : "8.6.0" "version" : "8.6.0"
} }
}, },
{
"identity" : "sfsafesymbols",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SFSafeSymbols/SFSafeSymbols.git",
"state" : {
"revision" : "7cca2d60925876b5953a2cf7341cd80fbeac983c",
"version" : "4.1.1"
}
},
{ {
"identity" : "swift-algorithms", "identity" : "swift-algorithms",
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
@@ -72,29 +72,27 @@ struct LoginScreen: View {
.padding(.horizontal, 16) .padding(.horizontal, 16)
.padding(.bottom, 8) .padding(.bottom, 8)
TextField(L10n.commonUsername, TextField(text: $context.username) {
text: $context.username, Text(L10n.commonUsername).foregroundColor(.compound.textPlaceholder)
// Prompt colour fixes a flicker that occurs before the text field style introspects the field. }
prompt: Text(L10n.commonUsername).foregroundColor(.compound.textPlaceholder)) .focused($isUsernameFocused)
.focused($isUsernameFocused) .textFieldStyle(.elementInput(accessibilityIdentifier: A11yIdentifiers.loginScreen.emailUsername))
.textFieldStyle(.elementInput(accessibilityIdentifier: A11yIdentifiers.loginScreen.emailUsername)) .disableAutocorrection(true)
.disableAutocorrection(true) .textContentType(.username)
.textContentType(.username) .autocapitalization(.none)
.autocapitalization(.none) .submitLabel(.next)
.submitLabel(.next) .onChange(of: isUsernameFocused, perform: usernameFocusChanged)
.onChange(of: isUsernameFocused, perform: usernameFocusChanged) .onSubmit { isPasswordFocused = true }
.onSubmit { isPasswordFocused = true } .padding(.bottom, 20)
.padding(.bottom, 20)
SecureField(L10n.commonPassword, SecureField(text: $context.password) {
text: $context.password, Text(L10n.commonPassword).foregroundColor(.compound.textPlaceholder)
// Prompt colour fixes a flicker that occurs before the text field style introspects the field. }
prompt: Text(L10n.commonPassword).foregroundColor(.compound.textPlaceholder)) .focused($isPasswordFocused)
.focused($isPasswordFocused) .textFieldStyle(.elementInput(accessibilityIdentifier: A11yIdentifiers.loginScreen.password))
.textFieldStyle(.elementInput(accessibilityIdentifier: A11yIdentifiers.loginScreen.password)) .textContentType(.password)
.textContentType(.password) .submitLabel(.done)
.submitLabel(.done) .onSubmit(submit)
.onSubmit(submit)
Spacer().frame(height: 32) Spacer().frame(height: 32)
@@ -23,6 +23,8 @@ struct BugReportScreen: View {
@ObservedObject var context: BugReportScreenViewModel.Context @ObservedObject var context: BugReportScreenViewModel.Context
var photosPickerTitle: String { context.viewState.screenshot == nil ? L10n.screenBugReportAttachScreenshot : L10n.screenBugReportEditScreenshot }
var body: some View { var body: some View {
Form { Form {
textFieldSection textFieldSection
@@ -31,7 +33,7 @@ struct BugReportScreen: View {
canContactSection canContactSection
} }
.scrollDismissesKeyboard(.immediately) .scrollDismissesKeyboard(.immediately)
.compoundForm() .compoundList()
.navigationTitle(L10n.commonReportABug) .navigationTitle(L10n.commonReportABug)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.toolbar { toolbar } .toolbar { toolbar }
@@ -50,53 +52,48 @@ struct BugReportScreen: View {
private var textFieldSection: some View { private var textFieldSection: some View {
Section { Section {
TextField(L10n.screenBugReportEditorPlaceholder, ListRow(label: .plain(title: L10n.screenBugReportEditorPlaceholder),
text: $context.reportText, kind: .textField(text: $context.reportText))
prompt: Text(L10n.screenBugReportEditorPlaceholder).compoundFormTextFieldPlaceholder(),
axis: .vertical)
.lineLimit(4, reservesSpace: true) .lineLimit(4, reservesSpace: true)
.textFieldStyle(.compoundForm)
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.report) .accessibilityIdentifier(A11yIdentifiers.bugReportScreen.report)
} footer: { } footer: {
Text(L10n.screenBugReportEditorDescription) Text(L10n.screenBugReportEditorDescription)
.compoundFormSectionFooter() .compoundListSectionFooter()
} }
.compoundFormSection()
} }
private var sendLogsSection: some View { private var sendLogsSection: some View {
Section { Section {
Toggle(L10n.screenBugReportIncludeLogs, isOn: $context.sendingLogsEnabled) ListRow(label: .plain(title: L10n.screenBugReportIncludeLogs),
.toggleStyle(.compoundForm) kind: .toggle($context.sendingLogsEnabled))
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.sendLogs) .accessibilityIdentifier(A11yIdentifiers.bugReportScreen.sendLogs)
} footer: { } footer: {
Text(L10n.screenBugReportLogsDescription) Text(L10n.screenBugReportLogsDescription)
.compoundFormSectionFooter() .compoundListSectionFooter()
} }
.compoundFormSection()
} }
private var canContactSection: some View { private var canContactSection: some View {
Section { Section {
Toggle(L10n.screenBugReportContactMeTitle, isOn: $context.canContact) ListRow(label: .plain(title: L10n.screenBugReportContactMeTitle),
.toggleStyle(.compoundForm) kind: .toggle($context.canContact))
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.canContact) .accessibilityIdentifier(A11yIdentifiers.bugReportScreen.canContact)
} footer: { } footer: {
Text(L10n.screenBugReportContactMe) Text(L10n.screenBugReportContactMe)
.compoundFormSectionFooter() .compoundListSectionFooter()
} }
.compoundFormSection()
} }
@ViewBuilder @ViewBuilder
private var attachScreenshotSection: some View { private var attachScreenshotSection: some View {
Section { Section {
PhotosPicker(selection: $selectedScreenshot, ListRow(kind: .custom {
matching: .screenshots, PhotosPicker(selection: $selectedScreenshot,
photoLibrary: .shared()) { matching: .screenshots,
Label(context.viewState.screenshot == nil ? L10n.screenBugReportAttachScreenshot : L10n.screenBugReportEditScreenshot, systemImage: "camera") photoLibrary: .shared()) {
} ListLabel.default(title: photosPickerTitle, systemIcon: .camera)
.buttonStyle(.compoundForm()) }
})
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.attachScreenshot) .accessibilityIdentifier(A11yIdentifiers.bugReportScreen.attachScreenshot)
} footer: { } footer: {
if let screenshot = context.viewState.screenshot { if let screenshot = context.viewState.screenshot {
@@ -117,7 +114,6 @@ struct BugReportScreen: View {
.padding(.horizontal, 16) .padding(.horizontal, 16)
} }
} }
.compoundFormSection()
} }
@ToolbarContentBuilder @ToolbarContentBuilder
@@ -14,6 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import Compound
import SwiftUI import SwiftUI
struct ReportContentScreen: View { struct ReportContentScreen: View {
@@ -32,7 +33,7 @@ struct ReportContentScreen: View {
ignoreUserSection ignoreUserSection
} }
.scrollDismissesKeyboard(.immediately) .scrollDismissesKeyboard(.immediately)
.compoundForm() .compoundList()
.navigationTitle(L10n.actionReportContent) .navigationTitle(L10n.actionReportContent)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.toolbar { toolbar } .toolbar { toolbar }
@@ -41,27 +42,23 @@ struct ReportContentScreen: View {
private var reasonSection: some View { private var reasonSection: some View {
Section { Section {
TextField(L10n.reportContentHint, ListRow(label: .plain(title: L10n.reportContentHint),
text: $context.reasonText, kind: .textField(text: $context.reasonText))
prompt: Text(L10n.reportContentHint).compoundFormTextFieldPlaceholder(),
axis: .vertical)
.lineLimit(4, reservesSpace: true) .lineLimit(4, reservesSpace: true)
.textFieldStyle(.compoundForm)
} footer: { } footer: {
Text(L10n.reportContentExplanation) Text(L10n.reportContentExplanation)
.compoundFormSectionFooter() .compoundListSectionFooter()
} }
.compoundFormSection()
} }
private var ignoreUserSection: some View { private var ignoreUserSection: some View {
Section { Section {
Toggle(L10n.screenReportContentBlockUser, isOn: $context.ignoreUser) ListRow(label: .plain(title: L10n.screenReportContentBlockUser),
.toggleStyle(.compoundForm) kind: .toggle($context.ignoreUser))
.accessibilityIdentifier(A11yIdentifiers.reportContent.ignoreUser) .accessibilityIdentifier(A11yIdentifiers.reportContent.ignoreUser)
} footer: { } footer: {
Text(L10n.screenReportContentBlockUserHint) Text(L10n.screenReportContentBlockUserHint)
.compoundFormSectionFooter() .compoundListSectionFooter()
} }
} }
@@ -46,6 +46,16 @@ struct RoomDetailsEditScreenViewState: BindableState {
bindings.name != initialName bindings.name != initialName
} }
/// The string shown for the room's name when it can't be edited.
var nameRowTitle: String {
bindings.name.isEmpty ? L10n.commonRoomName : bindings.name
}
/// The string shown for the room's topic when it can't be edited.
var topicRowTitle: String {
bindings.topic.isEmpty ? L10n.commonTopic : bindings.topic
}
var topicDidChange: Bool { var topicDidChange: Bool {
bindings.topic != initialTopic bindings.topic != initialTopic
} }
@@ -14,6 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import Compound
import SwiftUI import SwiftUI
struct RoomDetailsEditScreen: View { struct RoomDetailsEditScreen: View {
@@ -31,7 +32,7 @@ struct RoomDetailsEditScreen: View {
nameSection nameSection
topicSection topicSection
} }
.compoundForm() .compoundList()
.scrollDismissesKeyboard(.immediately) .scrollDismissesKeyboard(.immediately)
.navigationTitle(L10n.screenRoomDetailsEditRoomTitle) .navigationTitle(L10n.screenRoomDetailsEditRoomTitle)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
@@ -85,42 +86,39 @@ struct RoomDetailsEditScreen: View {
private var nameSection: some View { private var nameSection: some View {
Section { Section {
let canEditName = context.viewState.canEditName if context.viewState.canEditName {
ListRow(label: .plain(title: L10n.commonRoomNamePlaceholder),
TextField(L10n.commonRoomName, kind: .textField(text: $context.name, axis: .horizontal))
text: $context.name, .focused($focus, equals: .name)
prompt: canEditName ? Text(L10n.commonRoomNamePlaceholder) : nil, } else {
axis: .horizontal) ListRow(kind: .custom {
.focused($focus, equals: .name) ListLabel.plain(title: context.viewState.nameRowTitle)
.textFieldStyle(.compoundForm) .listRowBackground(Color.clear)
.disabled(!canEditName) })
.listRowBackground(canEditName ? Color.element.formRowBackground : .clear) }
.clipShape(RoundedRectangle(cornerRadius: 8))
} header: { } header: {
Text(L10n.commonRoomName) Text(L10n.commonRoomName)
.compoundFormSectionHeader() .compoundListSectionHeader()
} }
.compoundFormSection()
} }
private var topicSection: some View { private var topicSection: some View {
Section { Section {
let canEditTopic = context.viewState.canEditTopic if context.viewState.canEditTopic {
ListRow(label: .plain(title: L10n.commonTopicPlaceholder),
TextField(L10n.commonTopic, kind: .textField(text: $context.topic, axis: .vertical))
text: $context.topic, .focused($focus, equals: .topic)
prompt: canEditTopic ? Text(L10n.commonTopicPlaceholder).foregroundColor(.compound.textPlaceholder) : nil, .lineLimit(3...)
axis: .vertical) } else {
.focused($focus, equals: .topic) ListRow(kind: .custom {
.textFieldStyle(.compoundForm) ListLabel.plain(title: context.viewState.topicRowTitle)
.disabled(!canEditTopic) .listRowBackground(Color.clear)
.listRowBackground(canEditTopic ? Color.element.formRowBackground : .clear) })
.lineLimit(3...) }
} header: { } header: {
Text(L10n.commonTopic) Text(L10n.commonTopic)
.compoundFormSectionHeader() .compoundListSectionHeader()
} }
.compoundFormSection()
} }
private var avatarOverlayIcon: some View { private var avatarOverlayIcon: some View {
@@ -166,9 +164,23 @@ struct RoomDetailsEditScreen_Previews: PreviewProvider {
roomProxy: RoomProxyMock(with: .init(name: "Room", displayName: "Room")), roomProxy: RoomProxyMock(with: .init(name: "Room", displayName: "Room")),
userIndicatorController: UserIndicatorControllerMock.default) userIndicatorController: UserIndicatorControllerMock.default)
static let readOnlyViewModel = {
let accountOwner = RoomMemberProxyMock.mockOwner(allowedStateEvents: [])
return RoomDetailsEditScreenViewModel(accountOwner: accountOwner,
mediaProvider: MockMediaProvider(),
roomProxy: RoomProxyMock(with: .init(name: "Room", displayName: "Room")),
userIndicatorController: UserIndicatorControllerMock.default)
}()
static var previews: some View { static var previews: some View {
NavigationStack { NavigationStack {
RoomDetailsEditScreen(context: viewModel.context) RoomDetailsEditScreen(context: viewModel.context)
} }
.previewDisplayName("Normal")
NavigationStack {
RoomDetailsEditScreen(context: readOnlyViewModel.context)
}
.previewDisplayName("Read only")
} }
} }
@@ -14,6 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import Compound
import SwiftUI import SwiftUI
struct RoomDetailsScreen: View { struct RoomDetailsScreen: View {
@@ -47,7 +48,7 @@ struct RoomDetailsScreen: View {
leaveRoomSection leaveRoomSection
} }
.compoundForm() .compoundList()
.alert(item: $context.alertInfo) .alert(item: $context.alertInfo)
.alert(item: $context.leaveRoomAlertItem, .alert(item: $context.leaveRoomAlertItem,
actions: leaveRoomAlertActions, actions: leaveRoomAlertActions,
@@ -125,74 +126,55 @@ struct RoomDetailsScreen: View {
if context.viewState.hasTopicSection { if context.viewState.hasTopicSection {
Section { Section {
if let topic = context.viewState.topic, !topic.isEmpty { if let topic = context.viewState.topic, !topic.isEmpty {
Text(topic) ListRow(label: .description(topic), kind: .label)
.compoundFormSecondaryTextRow()
.lineLimit(isTopicExpanded ? nil : 3) .lineLimit(isTopicExpanded ? nil : 3)
.onTapGesture { isTopicExpanded.toggle() } .onTapGesture { isTopicExpanded.toggle() }
} else { } else {
Button { ListRow(label: .plain(title: L10n.screenRoomDetailsAddTopicTitle),
context.send(viewAction: .processTapAddTopic) kind: .button { context.send(viewAction: .processTapAddTopic) })
} label: { .accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.addTopic)
Text(L10n.screenRoomDetailsAddTopicTitle)
}
.buttonStyle(.compoundForm())
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.addTopic)
} }
} header: { } header: {
Text(L10n.commonTopic) Text(L10n.commonTopic)
.compoundFormSectionHeader() .compoundListSectionHeader()
} }
.compoundFormSection()
} }
} }
private var aboutSection: some View { private var aboutSection: some View {
Section { Section {
Button { ListRow(label: .default(title: L10n.commonPeople, systemIcon: .person),
context.send(viewAction: .processTapPeople) details: .title(String(context.viewState.joinedMembersCount)),
} label: { kind: .navigationLink {
LabeledContent { context.send(viewAction: .processTapPeople)
Text(String(context.viewState.joinedMembersCount)) })
} label: { .accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.people)
Label(L10n.commonPeople, systemImage: "person")
}
}
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.people)
if context.viewState.canInviteUsers { if context.viewState.canInviteUsers {
Button { ListRow(label: .default(title: L10n.screenRoomDetailsInvitePeopleTitle,
context.send(viewAction: .processTapInvite) systemIcon: .personBadgePlus),
} label: { kind: .navigationLink {
Label(L10n.screenRoomDetailsInvitePeopleTitle, systemImage: "person.badge.plus") context.send(viewAction: .processTapInvite)
} })
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.invite) .accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.invite)
} }
} }
.buttonStyle(.compoundForm(accessory: .navigationLink))
.compoundFormSection()
} }
@ViewBuilder @ViewBuilder
private var notificationSection: some View { private var notificationSection: some View {
Section { Section {
Button { ListRow(label: .default(title: L10n.screenRoomDetailsNotificationTitle,
context.send(viewAction: .processTapNotifications) systemIcon: .bell),
} label: { details: context.viewState.notificationSettingsState.isLoading ? .isWaiting(true)
LabeledContent { : context.viewState.notificationSettingsState.isError ? .systemIcon(.exclamationmarkCircle)
if context.viewState.notificationSettingsState.isLoading { : .title(context.viewState.notificationSettingsState.label),
ProgressView() kind: .navigationLink {
} else if context.viewState.notificationSettingsState.isError { context.send(viewAction: .processTapNotifications)
Image(systemName: "exclamationmark.circle") })
} else { .disabled(context.viewState.notificationSettingsState.isLoading)
Text(context.viewState.notificationSettingsState.label) .accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications)
}
} label: {
Label(L10n.screenRoomDetailsNotificationTitle, systemImage: "bell")
}
}
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications)
} }
.buttonStyle(.compoundForm(accessory: context.viewState.notificationSettingsState.isLoaded ? .navigationLink : nil))
.disabled(context.viewState.notificationSettingsState.isLoading) .disabled(context.viewState.notificationSettingsState.isLoading)
} }
@@ -215,51 +197,38 @@ struct RoomDetailsScreen: View {
private var securitySection: some View { private var securitySection: some View {
if context.viewState.isEncrypted { if context.viewState.isEncrypted {
Section { Section {
Label { ListRow(label: .default(title: L10n.screenRoomDetailsEncryptionEnabledTitle,
Text(L10n.screenRoomDetailsEncryptionEnabledTitle) description: L10n.screenRoomDetailsEncryptionEnabledSubtitle,
} icon: { systemIcon: .lockShield,
Image(systemName: "lock.shield") iconAlignment: .top),
} kind: .label)
.labelStyle(.compoundFormRow(secondaryText: L10n.screenRoomDetailsEncryptionEnabledSubtitle,
alignment: .top))
} header: { } header: {
Text(L10n.commonSecurity) Text(L10n.commonSecurity)
.compoundFormSectionHeader() .compoundListSectionHeader()
} }
.compoundFormSection()
} }
} }
private var leaveRoomSection: some View { private var leaveRoomSection: some View {
Section { Section {
Button(role: .destructive) { ListRow(label: .default(title: L10n.actionLeaveRoom,
context.send(viewAction: .processTapLeave) systemIcon: .doorRightHandOpen,
} label: { role: .destructive),
Label(L10n.actionLeaveRoom, systemImage: "door.right.hand.open") kind: .button { context.send(viewAction: .processTapLeave) })
}
.buttonStyle(.compoundForm())
} }
.compoundFormSection()
} }
private func ignoreUserSection(user: RoomMemberDetails) -> some View { private func ignoreUserSection(user: RoomMemberDetails) -> some View {
Section { Section {
Button(role: user.isIgnored ? nil : .destructive) { ListRow(label: .default(title: user.isIgnored ? L10n.screenDmDetailsUnblockUser : L10n.screenDmDetailsBlockUser,
context.send(viewAction: user.isIgnored ? .processTapUnignore : .processTapIgnore) systemIcon: .slashCircle,
} label: { role: user.isIgnored ? nil : .destructive),
LabeledContent { details: .isWaiting(context.viewState.isProcessingIgnoreRequest),
if context.viewState.isProcessingIgnoreRequest { kind: .button {
ProgressView() context.send(viewAction: user.isIgnored ? .processTapUnignore : .processTapIgnore)
} })
} label: { .disabled(context.viewState.isProcessingIgnoreRequest)
Label(user.isIgnored ? L10n.screenDmDetailsUnblockUser : L10n.screenDmDetailsBlockUser,
systemImage: "slash.circle")
}
}
.buttonStyle(.compoundForm())
.disabled(context.viewState.isProcessingIgnoreRequest)
} }
.compoundFormSection()
} }
@ViewBuilder @ViewBuilder
@@ -54,7 +54,7 @@ struct RoomNotificationSettingsScreenViewState: BindableState {
let strings = RoomNotificationSettingsScreenStrings() let strings = RoomNotificationSettingsScreenStrings()
var notificationSettingsState: RoomNotificationSettingsState = .loading var notificationSettingsState: RoomNotificationSettingsState = .loading
var availableCustomRoomNotificationModes: [RoomNotificationModeProxy] = [.allMessages, .mentionsAndKeywordsOnly, .mute] var availableCustomRoomNotificationModes: [RoomNotificationModeProxy] = [.allMessages, .mentionsAndKeywordsOnly, .mute]
var isRestoringDefautSetting = false var isRestoringDefaultSetting = false
var pendingCustomMode: RoomNotificationModeProxy? var pendingCustomMode: RoomNotificationModeProxy?
} }
@@ -82,7 +82,7 @@ class RoomNotificationSettingsScreenViewModel: RoomNotificationSettingsScreenVie
isOneToOne: roomProxy.activeMembersCount == 2) isOneToOne: roomProxy.activeMembersCount == 2)
guard !Task.isCancelled else { return } guard !Task.isCancelled else { return }
state.notificationSettingsState = .loaded(settings: settings) state.notificationSettingsState = .loaded(settings: settings)
if !state.isRestoringDefautSetting { if !state.isRestoringDefaultSetting {
state.bindings.allowCustomSetting = !settings.isDefault state.bindings.allowCustomSetting = !settings.isDefault
} }
if state.pendingCustomMode == nil { if state.pendingCustomMode == nil {
@@ -106,14 +106,14 @@ class RoomNotificationSettingsScreenViewModel: RoomNotificationSettingsScreenVie
} }
private func restoreDefaultSetting() { private func restoreDefaultSetting() {
state.isRestoringDefautSetting = true state.isRestoringDefaultSetting = true
Task { Task {
do { do {
try await notificationSettingsProxy.restoreDefaultNotificationMode(roomId: roomProxy.id) try await notificationSettingsProxy.restoreDefaultNotificationMode(roomId: roomProxy.id)
} catch { } catch {
displayError(.restoreDefaultFailed) displayError(.restoreDefaultFailed)
} }
state.isRestoringDefautSetting = false state.isRestoringDefaultSetting = false
} }
} }
@@ -14,6 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import Compound
import SwiftUI import SwiftUI
struct RoomNotificationSettingsScreen: View { struct RoomNotificationSettingsScreen: View {
@@ -29,7 +30,7 @@ struct RoomNotificationSettingsScreen: View {
customSettingsSection customSettingsSection
} }
} }
.compoundForm() .compoundList()
.navigationTitle(L10n.screenRoomDetailsNotificationTitle) .navigationTitle(L10n.screenRoomDetailsNotificationTitle)
.alert(item: $context.alertInfo) .alert(item: $context.alertInfo)
.track(screen: .roomNotifications) .track(screen: .roomNotifications)
@@ -40,35 +41,28 @@ struct RoomNotificationSettingsScreen: View {
@ViewBuilder @ViewBuilder
private var allowCustomSettingSection: some View { private var allowCustomSettingSection: some View {
Section { Section {
Toggle(isOn: $context.allowCustomSetting) { ListRow(label: .plain(title: L10n.screenRoomNotificationSettingsAllowCustom),
Text(L10n.screenRoomNotificationSettingsAllowCustom) kind: .toggle($context.allowCustomSetting))
} .accessibilityIdentifier(A11yIdentifiers.roomNotificationSettingsScreen.allowCustomSetting)
.toggleStyle(.compoundForm) .disabled(context.viewState.notificationSettingsState.isLoading)
.accessibilityIdentifier(A11yIdentifiers.roomNotificationSettingsScreen.allowCustomSetting) .onChange(of: context.allowCustomSetting) { _ in
.disabled(context.viewState.notificationSettingsState.isLoading) context.send(viewAction: .changedAllowCustomSettings)
.onChange(of: context.allowCustomSetting) { _ in }
context.send(viewAction: .changedAllowCustomSettings)
}
} footer: { } footer: {
Text(L10n.screenRoomNotificationSettingsAllowCustomFootnote) Text(L10n.screenRoomNotificationSettingsAllowCustomFootnote)
.compoundFormSectionFooter() .compoundListSectionFooter()
} }
.compoundFormSection()
} }
@ViewBuilder @ViewBuilder
private var defaultSettingSection: some View { private var defaultSettingSection: some View {
Section { Section {
if context.viewState.isRestoringDefautSetting { ListRow(label: .plain(title: context.viewState.isRestoringDefaultSetting ? L10n.commonLoading : context.viewState.strings.string(for: context.viewState.notificationSettingsState)),
Text(L10n.commonLoading) kind: .label)
.foregroundColor(.compound.textPlaceholder) .disabled(context.viewState.isRestoringDefaultSetting)
} else {
Text(context.viewState.strings.string(for: context.viewState.notificationSettingsState))
.foregroundColor(.compound.textPrimary)
}
} header: { } header: {
Text(L10n.screenRoomNotificationSettingsDefaultSettingTitle) Text(L10n.screenRoomNotificationSettingsDefaultSettingTitle)
.compoundFormSectionHeader() .compoundListSectionHeader()
} footer: { } footer: {
Text(context.viewState.strings.customSettingFootnote) Text(context.viewState.strings.customSettingFootnote)
.environment(\.openURL, OpenURLAction { url in .environment(\.openURL, OpenURLAction { url in
@@ -76,30 +70,25 @@ struct RoomNotificationSettingsScreen: View {
context.send(viewAction: .customSettingFootnoteLinkTapped) context.send(viewAction: .customSettingFootnoteLinkTapped)
return .handled return .handled
}) })
.compoundFormSectionFooter() .compoundListSectionFooter()
} }
.compoundFormSection()
} }
@ViewBuilder @ViewBuilder
private var customSettingsSection: some View { private var customSettingsSection: some View {
Section { Section {
Picker("", selection: $context.customMode) { ListRow(label: .plain(title: L10n.screenRoomNotificationSettingsCustomSettingsTitle),
ForEach(context.viewState.availableCustomRoomNotificationModes, id: \.self) { mode in kind: .inlinePicker(selection: $context.customMode,
Text(context.viewState.strings.string(for: mode)) items: context.viewState.availableCustomRoomNotificationModes.map {
.tag(mode) (title: context.viewState.strings.string(for: $0), tag: $0)
} }))
} .onChange(of: context.customMode) { mode in
.onChange(of: context.customMode) { mode in context.send(viewAction: .setCustomMode(mode))
context.send(viewAction: .setCustomMode(mode)) }
}
.labelsHidden()
.pickerStyle(.inline)
} header: { } header: {
Text(L10n.screenRoomNotificationSettingsCustomSettingsTitle) Text(L10n.screenRoomNotificationSettingsCustomSettingsTitle)
.compoundFormSectionHeader() .compoundListSectionHeader()
} }
.compoundFormSection()
} }
} }
@@ -14,6 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import Compound
import SwiftUI import SwiftUI
struct AnalyticsSettingsScreen: View { struct AnalyticsSettingsScreen: View {
@@ -23,25 +24,23 @@ struct AnalyticsSettingsScreen: View {
Form { Form {
analyticsSection analyticsSection
} }
.compoundForm() .compoundList()
.navigationTitle(L10n.commonAnalytics) .navigationTitle(L10n.commonAnalytics)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
} }
var analyticsSection: some View { var analyticsSection: some View {
Section { Section {
Toggle(isOn: $context.enableAnalytics) { ListRow(label: .default(title: L10n.screenAnalyticsSettingsShareData,
Label(L10n.screenAnalyticsSettingsShareData, systemImage: "chart.bar") systemIcon: .chartBar),
} kind: .toggle($context.enableAnalytics))
.toggleStyle(.compoundForm) .onChange(of: context.enableAnalytics) { _ in
.onChange(of: context.enableAnalytics) { _ in context.send(viewAction: .toggleAnalytics)
context.send(viewAction: .toggleAnalytics) }
}
} footer: { } footer: {
Text(context.viewState.strings.sectionFooter) Text(context.viewState.strings.sectionFooter)
.compoundFormSectionFooter() .compoundListSectionFooter()
} }
.compoundFormSection()
} }
} }
@@ -14,6 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import Compound
import SwiftUI import SwiftUI
struct LegalInformationScreen: View { struct LegalInformationScreen: View {
@@ -23,20 +24,15 @@ struct LegalInformationScreen: View {
var body: some View { var body: some View {
Form { Form {
Section { Section {
Button(L10n.commonCopyright) { ListRow(label: .plain(title: L10n.commonCopyright),
openURL("https://element.io/copyright") kind: .navigationLink { openURL("https://element.io/copyright") })
} ListRow(label: .plain(title: L10n.commonAcceptableUsePolicy),
Button(L10n.commonAcceptableUsePolicy) { kind: .navigationLink { openURL("https://element.io/acceptable-use-policy-terms") })
openURL("https://element.io/acceptable-use-policy-terms") ListRow(label: .plain(title: L10n.commonPrivacyPolicy),
} kind: .navigationLink { openURL("https://element.io/privacy") })
Button(L10n.commonPrivacyPolicy) {
openURL("https://element.io/privacy")
}
} }
.buttonStyle(.compoundForm(accessory: .navigationLink))
.compoundFormSection()
} }
.compoundForm() .compoundList()
.navigationTitle(L10n.commonAbout) .navigationTitle(L10n.commonAbout)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
} }
@@ -14,6 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import Compound
import SwiftUI import SwiftUI
struct NotificationSettingsScreen: View { struct NotificationSettingsScreen: View {
@@ -35,7 +36,7 @@ struct NotificationSettingsScreen: View {
} }
} }
} }
.compoundForm() .compoundList()
.navigationTitle(L10n.screenNotificationSettingsTitle) .navigationTitle(L10n.screenNotificationSettingsTitle)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.toolbar { toolbar } .toolbar { toolbar }
@@ -58,120 +59,98 @@ struct NotificationSettingsScreen: View {
private var userPermissionSection: some View { private var userPermissionSection: some View {
Section { Section {
HStack(alignment: .firstTextBaseline, spacing: 13) { ListRow(kind: .custom {
Image(systemName: "exclamationmark.circle.fill") HStack(alignment: .firstTextBaseline, spacing: 13) {
.foregroundColor(.compound.iconTertiaryAlpha) Image(systemSymbol: .exclamationmarkCircleFill)
VStack(alignment: .leading, spacing: 2) { .foregroundColor(.compound.iconTertiaryAlpha)
Text(L10n.screenNotificationSettingsSystemNotificationsTurnedOff) VStack(alignment: .leading, spacing: 2) {
.font(.compound.bodyLG) Text(L10n.screenNotificationSettingsSystemNotificationsTurnedOff)
.foregroundColor(.compound.textPrimary) .font(.compound.bodyLG)
Text(context.viewState.strings.changeYourSystemSettings) .foregroundColor(.compound.textPrimary)
.font(.compound.bodySM) Text(context.viewState.strings.changeYourSystemSettings)
.foregroundColor(.compound.textSecondary) .font(.compound.bodySM)
.tint(.compound.textPrimary) .foregroundColor(.compound.textSecondary)
.environment(\.openURL, OpenURLAction { url in .tint(.compound.textPrimary)
context.send(viewAction: .linkClicked(url: url)) }
return .systemAction
})
} }
.padding(.vertical, 5) .padding(.horizontal, ListRowPadding.horizontal)
} .padding(.vertical, 8)
.environment(\.openURL, OpenURLAction { url in
context.send(viewAction: .linkClicked(url: url))
return .systemAction
})
})
} }
.compoundFormSection()
} }
private var enableNotificationSection: some View { private var enableNotificationSection: some View {
Section { Section {
Toggle(isOn: $context.enableNotifications) { ListRow(label: .plain(title: L10n.screenNotificationSettingsEnableNotifications),
Text(L10n.screenNotificationSettingsEnableNotifications) kind: .toggle($context.enableNotifications))
} .onChange(of: context.enableNotifications) { _ in
.toggleStyle(.compoundForm) context.send(viewAction: .changedEnableNotifications)
.onChange(of: context.enableNotifications) { _ in }
context.send(viewAction: .changedEnableNotifications)
}
} }
.compoundFormSection()
} }
private var roomsNotificationSection: some View { private var roomsNotificationSection: some View {
Section { Section {
// Group chats // Group chats
Button { ListRow(label: .plain(title: L10n.screenNotificationSettingsGroupChats),
context.send(viewAction: .groupChatsTapped) details: context.viewState.settings.map {
} label: { ListDetailsLabel.title(context.viewState.strings.string(for: $0.groupChatsMode))
LabeledContent { } ?? .isWaiting(true),
if let settings = context.viewState.settings { kind: .navigationLink {
Text(context.viewState.strings.string(for: settings.groupChatsMode)) context.send(viewAction: .groupChatsTapped)
} else { })
ProgressView() .disabled(context.viewState.settings == nil)
} .accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications)
} label: {
Text(L10n.screenNotificationSettingsGroupChats)
}
}
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications)
.buttonStyle(.compoundForm(accessory: context.viewState.settings.flatMap { _ in .navigationLink }))
.disabled(context.viewState.settings == nil)
// Direct chats // Direct chats
Button { ListRow(label: .plain(title: L10n.screenNotificationSettingsDirectChats),
context.send(viewAction: .directChatsTapped) details: context.viewState.settings.map {
} label: { ListDetailsLabel.title(context.viewState.strings.string(for: $0.directChatsMode))
LabeledContent { } ?? .isWaiting(true),
if let settings = context.viewState.settings { kind: .navigationLink {
Text(context.viewState.strings.string(for: settings.directChatsMode)) context.send(viewAction: .directChatsTapped)
} else { })
ProgressView() .disabled(context.viewState.settings == nil)
} .accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications)
} label: {
Text(L10n.screenNotificationSettingsDirectChats)
}
}
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.notifications)
.buttonStyle(.compoundForm(accessory: context.viewState.settings.flatMap { _ in .navigationLink }))
.disabled(context.viewState.settings == nil)
} header: { } header: {
Text(L10n.screenNotificationSettingsNotificationSectionTitle) Text(L10n.screenNotificationSettingsNotificationSectionTitle)
.compoundFormSectionHeader() .compoundListSectionHeader()
} }
.compoundFormSection()
} }
private var mentionsSection: some View { private var mentionsSection: some View {
Section { Section {
Toggle(isOn: $context.roomMentionsEnabled) { ListRow(label: .plain(title: L10n.screenNotificationSettingsRoomMentionLabel),
Text(L10n.screenNotificationSettingsRoomMentionLabel) kind: .toggle($context.roomMentionsEnabled))
} .disabled(context.viewState.settings?.roomMentionsEnabled == nil)
.toggleStyle(.compoundForm) .allowsHitTesting(!context.viewState.applyingChange)
.onChange(of: context.roomMentionsEnabled) { _ in .onChange(of: context.roomMentionsEnabled) { _ in
context.send(viewAction: .roomMentionChanged) context.send(viewAction: .roomMentionChanged)
} }
.disabled(context.viewState.settings?.roomMentionsEnabled == nil)
.allowsHitTesting(!context.viewState.applyingChange)
} header: { } header: {
Text(L10n.screenNotificationSettingsMentionsSectionTitle) Text(L10n.screenNotificationSettingsMentionsSectionTitle)
.compoundFormSectionHeader() .compoundListSectionHeader()
} }
.compoundFormSection()
} }
private var callsSection: some View { private var callsSection: some View {
Section { Section {
Toggle(isOn: $context.callsEnabled) { ListRow(label: .plain(title: L10n.screenNotificationSettingsCallsLabel),
Text(L10n.screenNotificationSettingsCallsLabel) kind: .toggle($context.callsEnabled))
} .disabled(context.viewState.settings?.callsEnabled == nil)
.toggleStyle(.compoundForm) .allowsHitTesting(!context.viewState.applyingChange)
.onChange(of: context.callsEnabled) { _ in .onChange(of: context.callsEnabled) { _ in
context.send(viewAction: .callsChanged) context.send(viewAction: .callsChanged)
} }
.disabled(context.viewState.settings?.callsEnabled == nil)
.allowsHitTesting(!context.viewState.applyingChange)
} header: { } header: {
Text(L10n.screenNotificationSettingsAdditionalSettingsSectionTitle) Text(L10n.screenNotificationSettingsAdditionalSettingsSectionTitle)
.compoundFormSectionHeader() .compoundListSectionHeader()
} }
.compoundFormSection()
} }
} }
@@ -38,7 +38,7 @@ struct SettingsScreen: View {
signOutSection signOutSection
} }
.compoundForm() .compoundList()
.navigationTitle(L10n.commonSettings) .navigationTitle(L10n.commonSettings)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.toolbar { .toolbar {
@@ -48,118 +48,118 @@ struct SettingsScreen: View {
} }
} }
private var versionText: some View { private var versionText: Text {
Text(L10n.settingsVersionNumber(InfoPlistReader.main.bundleShortVersionString, InfoPlistReader.main.bundleVersion)) Text(L10n.settingsVersionNumber(InfoPlistReader.main.bundleShortVersionString, InfoPlistReader.main.bundleVersion))
} }
private var userSection: some View { private var userSection: some View {
Section { Section {
HStack(spacing: 12) { ListRow(kind: .custom {
LoadableAvatarImage(url: context.viewState.userAvatarURL, HStack(spacing: 12) {
name: context.viewState.userDisplayName, LoadableAvatarImage(url: context.viewState.userAvatarURL,
contentID: context.viewState.userID, name: context.viewState.userDisplayName,
avatarSize: .user(on: .settings), contentID: context.viewState.userID,
imageProvider: context.imageProvider) avatarSize: .user(on: .settings),
.accessibilityHidden(true) imageProvider: context.imageProvider)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 2) {
Text(context.viewState.userDisplayName ?? "") VStack(alignment: .leading, spacing: 2) {
.font(.compound.headingMD) Text(context.viewState.userDisplayName ?? "")
.foregroundColor(.compound.textPrimary) .font(.compound.headingMD)
Text(context.viewState.userID) .foregroundColor(.compound.textPrimary)
.font(.compound.bodySM) Text(context.viewState.userID)
.foregroundColor(.compound.textSecondary) .font(.compound.bodySM)
.foregroundColor(.compound.textSecondary)
}
.accessibilityElement(children: .combine)
} }
.accessibilityElement(children: .combine) .padding(.horizontal, ListRowPadding.horizontal)
} .padding(.vertical, 8)
})
} }
.compoundFormSection()
} }
private var sessionVerificationSection: some View { private var sessionVerificationSection: some View {
Section { Section {
Button { context.send(viewAction: .sessionVerification) } label: { ListRow(label: .default(title: L10n.actionCompleteVerification,
Label(L10n.actionCompleteVerification, systemImage: "checkmark.shield") systemIcon: .checkmarkShield),
} kind: .button { context.send(viewAction: .sessionVerification) })
.buttonStyle(.compoundForm())
} }
.compoundFormSection()
} }
private var developerOptionsSection: some View { private var developerOptionsSection: some View {
Section { Section {
Button { context.send(viewAction: .developerOptions) } label: { ListRow(label: .default(title: L10n.commonDeveloperOptions,
Label(L10n.commonDeveloperOptions, systemImage: "hammer.circle") systemIcon: .hammerCircle),
} kind: .navigationLink {
.buttonStyle(.compoundForm(accessory: .navigationLink)) context.send(viewAction: .developerOptions)
.accessibilityIdentifier("developerOptionsButton") })
.accessibilityIdentifier("developerOptionsButton")
} }
.compoundFormSection()
} }
private var simplifiedSection: some View { private var simplifiedSection: some View {
Section { Section {
Picker(selection: $context.timelineStyle) { ListRow(label: .default(title: L10n.commonMessageLayout,
ForEach(TimelineStyle.allCases, id: \.self) { style in systemIcon: .rectangleGrid1x2),
Text(style.name) kind: .picker(selection: $context.timelineStyle,
.tag(style) items: TimelineStyle.allCases.map { (title: $0.name, tag: $0) }))
.accessibilityIdentifier("timelineStylePicker")
.onChange(of: context.timelineStyle) { _ in
context.send(viewAction: .changedTimelineStyle)
} }
} label: {
Label(L10n.commonMessageLayout, systemImage: "rectangle.grid.1x2")
}
.labelStyle(.compoundFormRow())
.accessibilityIdentifier("timelineStylePicker")
.onChange(of: context.timelineStyle) { _ in
context.send(viewAction: .changedTimelineStyle)
}
// Notifications // Notifications
if context.viewState.showNotificationSettings { if context.viewState.showNotificationSettings {
Button { context.send(viewAction: .notifications) } label: { ListRow(label: .default(title: L10n.screenNotificationSettingsTitle,
Label(L10n.screenNotificationSettingsTitle, systemImage: "bell") systemIcon: .bell),
} kind: .navigationLink {
.buttonStyle(.compoundForm(accessory: .navigationLink)) context.send(viewAction: .notifications)
.accessibilityIdentifier("notificationsButton") })
.accessibilityIdentifier("notificationsButton")
} }
// Analytics // Analytics
Button { context.send(viewAction: .analytics) } label: { ListRow(label: .default(title: L10n.commonAnalytics,
Label(L10n.commonAnalytics, systemImage: "chart.bar") systemIcon: .chartBar),
} kind: .navigationLink {
.buttonStyle(.compoundForm(accessory: .navigationLink)) context.send(viewAction: .analytics)
.accessibilityIdentifier("analyticsButton") })
.accessibilityIdentifier("analyticsButton")
// Report Bug // Report Bug
Button { context.send(viewAction: .reportBug) } label: { ListRow(label: .default(title: L10n.commonReportABug,
Label(L10n.commonReportABug, systemImage: "ladybug") systemIcon: .ladybug),
} kind: .navigationLink {
.buttonStyle(.compoundForm(accessory: .navigationLink)) context.send(viewAction: .reportBug)
.accessibilityIdentifier("reportBugButton") })
.accessibilityIdentifier("reportBugButton")
// About // About
Button { context.send(viewAction: .about) } label: { ListRow(label: .default(title: L10n.commonAbout,
Label(L10n.commonAbout, systemImage: "questionmark.circle") systemIcon: .questionmarkCircle),
} kind: .navigationLink {
.buttonStyle(.compoundForm(accessory: .navigationLink)) context.send(viewAction: .about)
.accessibilityIdentifier("aboutButton") })
.accessibilityIdentifier("aboutButton")
} }
.compoundFormSection()
} }
private var signOutSection: some View { private var signOutSection: some View {
Section { Section {
Button { showingLogoutConfirmation = true } label: { ListRow(label: .default(title: L10n.screenSignoutPreferenceItem,
Label(L10n.screenSignoutPreferenceItem, systemImage: "rectangle.portrait.and.arrow.right") systemIcon: .rectanglePortraitAndArrowRight),
} kind: .button {
.buttonStyle(.compoundForm()) showingLogoutConfirmation = true
.accessibilityIdentifier("logoutButton") })
.alert(L10n.screenSignoutConfirmationDialogTitle, isPresented: $showingLogoutConfirmation) { .accessibilityIdentifier("logoutButton")
Button(L10n.screenSignoutConfirmationDialogSubmit, .alert(L10n.screenSignoutConfirmationDialogTitle, isPresented: $showingLogoutConfirmation) {
role: .destructive, Button(L10n.screenSignoutConfirmationDialogSubmit,
action: logout) role: .destructive,
} message: { action: logout)
Text(L10n.screenSignoutConfirmationDialogContent) } message: {
} Text(L10n.screenSignoutConfirmationDialogContent)
}
} footer: { } footer: {
VStack { VStack {
versionText versionText
@@ -169,11 +169,10 @@ struct SettingsScreen: View {
Text(deviceID) Text(deviceID)
} }
} }
.compoundFormSectionFooter() .compoundListSectionFooter()
.textSelection(.enabled) .textSelection(.enabled)
.padding(.top, 24) .padding(.top, 24)
} }
.compoundFormSection()
} }
private var doneButton: some View { private var doneButton: some View {
@@ -204,7 +203,10 @@ private extension TimelineStyle {
struct SettingsScreen_Previews: PreviewProvider { struct SettingsScreen_Previews: PreviewProvider {
static let viewModel = { static let viewModel = {
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "@userid:example.com", let verificationController = SessionVerificationControllerProxyMock()
verificationController.isVerified = false
let userSession = MockUserSession(sessionVerificationController: verificationController,
clientProxy: MockClientProxy(userID: "@userid:example.com",
deviceID: "AAAAAAAAAAA"), deviceID: "AAAAAAAAAAA"),
mediaProvider: MockMediaProvider()) mediaProvider: MockMediaProvider())
ServiceLocator.shared.settings.notificationSettingsEnabled = true ServiceLocator.shared.settings.notificationSettingsEnabled = true
@@ -18,7 +18,7 @@ import Combine
struct MockUserSession: UserSessionProtocol { struct MockUserSession: UserSessionProtocol {
let callbacks = PassthroughSubject<UserSessionCallback, Never>() let callbacks = PassthroughSubject<UserSessionCallback, Never>()
let sessionVerificationController: SessionVerificationControllerProxyProtocol? = nil var sessionVerificationController: SessionVerificationControllerProxyProtocol?
var userID: String { clientProxy.userID } var userID: String { clientProxy.userID }
var deviceID: String? { clientProxy.deviceID } var deviceID: String? { clientProxy.deviceID }
var homeserver: String { clientProxy.homeserver } var homeserver: String { clientProxy.homeserver }
@@ -149,7 +149,10 @@ class MockScreen: Identifiable {
navigationStackCoordinator.setRootCoordinator(coordinator) navigationStackCoordinator.setRootCoordinator(coordinator)
return navigationStackCoordinator return navigationStackCoordinator
case .templateScreen: case .templateScreen:
return TemplateScreenCoordinator(parameters: .init()) let navigationStackCoordinator = NavigationStackCoordinator()
let coordinator = TemplateScreenCoordinator(parameters: .init())
navigationStackCoordinator.setRootCoordinator(coordinator)
return navigationStackCoordinator
case .home: case .home:
let navigationStackCoordinator = NavigationStackCoordinator() let navigationStackCoordinator = NavigationStackCoordinator()
let session = MockUserSession(clientProxy: MockClientProxy(userID: "@mock:matrix.org"), let session = MockUserSession(clientProxy: MockClientProxy(userID: "@mock:matrix.org"),
@@ -14,6 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import Compound
import SwiftUI import SwiftUI
struct TemplateScreen: View { struct TemplateScreen: View {
@@ -22,22 +23,15 @@ struct TemplateScreen: View {
var body: some View { var body: some View {
Form { Form {
Section { Section {
TextField(text: $context.composerText) { ListRow(label: .plain(title: context.viewState.placeholder),
Text(context.viewState.placeholder) kind: .textField(text: $context.composerText))
.compoundFormTextFieldPlaceholder()
}
.textFieldStyle(.compoundForm)
Button { ListRow(label: .centeredAction(title: L10n.actionDone,
context.send(viewAction: .done) systemIcon: .doorLeftHandClosed),
} label: { kind: .button { context.send(viewAction: .done) })
Label("Done", systemImage: "door.left.hand.closed")
}
.buttonStyle(.compoundFormCentred())
} }
.compoundFormSection()
} }
.compoundForm() .compoundList()
.navigationTitle(context.viewState.title) .navigationTitle(context.viewState.title)
.onChange(of: context.composerText) { _ in .onChange(of: context.composerText) { _ in
context.send(viewAction: .textChanged) context.send(viewAction: .textChanged)
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3716163032f1387a23ec46e2a7a0418f82dff973028d9029cd543a0b75b79c6b oid sha256:bced59675a1e38b3a11f01ccad5ffcb5311b88b62ab4e0e67c0be45c9d618bb8
size 78825 size 78828
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:70935aa783ef9392f8a1160fb68af5b7bf16dea9709ce1a5f049bcf6276309f1 oid sha256:0e998dc5ad773333476549bd07aa33c35c5b85fac14054b010586f229f355b4f
size 126496 size 126414
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:16e201d435c12a555bbee2746ebc35f011c6d2bb3a20bacf87c3341f1b5b0229 oid sha256:f9613904ca4f73523857a261447563b4d67559671f01dc57d608c86454a3ae40
size 194229 size 193362
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:d1eb3e91e264f86c6e9cded9159bbce88bd4bbe50242a609c37b514fdc2b0590 oid sha256:5ffbb02dbe9e489e8b3eef39ee398378dc9437a46270f3343b68f24e3153bcb3
size 201099 size 200366
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:6ee871f1bbee6b3b9208880b6d5b5da72422ffde72c6131dbaec96422b576caa oid sha256:0fa656e56fbbb76dde9792413e85e6c784a53c06bff22ebc48e0b4daab0585c0
size 137938 size 138861
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c5e16b7b56132cb5c7c30d502911dcb29b41efe3228c10053576fe4b34e5178e oid sha256:c514aee9863e5e4f98416dad06dd9cdc3712866355790936c53ef598f40d7646
size 94846 size 94913
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:1e733ae4dfab4652031797c366ddd025e3d1bf42cf1cf3b4095943aac7b7fc43 oid sha256:4b9fc8986e2a36e20975c4e4cb7eea2ceddb9f331092d5a84bdf608b36aeecb0
size 92844 size 92603
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c5c2128f0c2ff8eacd789bf31b0ca5575a3815b0baf7efc594d5c4f6382a107c oid sha256:a7764e39c3df507246e0312e4d65dbf1eee09486e69b8d2aee1d86b6c3632173
size 107997 size 107609
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:94c6d983f73986c694ae68c70a0ee223916185a361d6067f7c3ffc286d89547d oid sha256:b8b39f26310f411a198277dd56c86d697d1fc2a1c481de578bd9a22306881125
size 110720 size 110753
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:742dc32fe782bc6b75b8c1ec4e3cb373504fc43df728b189ca6f50d131e1acc9 oid sha256:ba1231592153758bb1bb6f2bf14cf6aa315817d9feda1596146f2a7702938bfb
size 98511 size 98119
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:4e88bae68d81e42f597de343d8a66a6f70c76d9878e3d7697c34ed533b568094 oid sha256:dc84e5329532d7ceb2bd86ed36f92a81e8351f1de261496762f83cbb259b8b7a
size 116369 size 115979
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3572d040c35de4772462d1627f92467af9cd383d454af08a71ba36cb2a7d2b4f oid sha256:6c80ca3aec401030496c7cc9991bcd22c083e3d42d986bdda929b79978d59177
size 78185 size 78871
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:25869965443a0580f2e0e3ac5cc69a0e576868b56e7d8550af77fbb3698c90e1 oid sha256:53a24ac906105f23d0a10340d5b59c998ffa0d621fde848a1b073241cd4ea4da
size 75225 size 74591
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:31971d8da2139d035c3dd59c595ea887ecd33a11c496464a4798dabb04503ab1 oid sha256:55ce6c018bba62f121ac067f1d7f048f0c9e93cbe4f01f759adc9d052d8bb6dc
size 91579 size 91307
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:6360b213d0c017f9dcf7747e621887c4dab3995e4603e87440bcfa7f1b9661be oid sha256:58ce388eac7c5b42632e3c541f97eb7ec69c7bc6b099e07180f299b63bf82bea
size 89003 size 89276
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:63da6c8b58724413818fdc5ec9a2b2712ac45b1195cad40121b9ae3d4c5186a1 oid sha256:8ce135e012a85e14fdbf8ad7a62d002d64b1b64b43be51cccc64c75793c7601f
size 113836 size 113300
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f8bcaae035fbde1d607e93ac048f3dbdefc5b35e6c8c48b59338744e43557ea6
size 84542
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c746f86864de6f4824352c0f019ba43ac90646cc26b8343721eec3564f5fffe
size 78946
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8028144ace72558a2191de668a45a2e33e67012c8108c04d25445b4139d81092
size 66099
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c295c1382e70b6eea9dddd502cf06b4008a46a2699daa05b079c29b25a9f54f7 oid sha256:cee7780c3b1110911c4de1f35b9ead6e36b10992c0a8c59b1fa5a87d43cdb5e2
size 87780 size 87879
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:75b4447894f5d3b8278c6118dc41f7c99efa5626491894d0ab287ff89af7f9ef oid sha256:4b2ab425b5e78387e8c7685a560062ced41ce64082483982fd9343f3bc8092dd
size 166816 size 167217
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:6ab050acaee21d58c9afcf68fa7ee861c4d67cd87156aaf46f299ce23c49790d oid sha256:641877828c934248454d8f194a497e7b52eafdbde2d523125d3492cec357136e
size 210535 size 208966
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:e47165276d97ab3f740508db22c7cea02c9de7954eb4d556870242521a8271b3 oid sha256:b8a88d419e02c297f10ac1b0c2f696e89a03ff762047251e70a15ac85234c22a
size 219096 size 215655
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:55f92756942d4a336258c2b3f46eec47561f1a2e3dd1265756fdeb7c66c54205 oid sha256:b535f994068f704ec7b52f5898843734f5412159f091f76e0e5cde22a7d8c3a9
size 181095 size 181099
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:5a330b8acd8f2a4ebdda45d125c29c17e21f6cd8fb2397443d7527988ff5a943 oid sha256:fc55ae0adc15b48788ee406d0bb425441744f11a3dc3f8cd5e8f0eb9180aedac
size 117146 size 119435
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:185f7126eff79219bb9cd832ba4acfba1775c96d26c8fe52099d431b76b5e430 oid sha256:3c074fc387e5d9602cd8190fa5697af2dc0ab2660d2a930229b07ff3d15662a4
size 114420 size 114440
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:829664b07f3eea5dd69b58bb264b11b9f4770e640d71a27951fcd25242d2777f oid sha256:90aefb602146db2b9b35e1d48f5fe1fa6158f5fc9e610685764a0951e7488a39
size 136151 size 136987
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:d1e011a2f3b8072bbe30da83609f309ef1b3c910ea54cd2389bd96e9e65b95d3 oid sha256:a0f44c495b3cf91392ca144a313c991871f3f4a3c015a5493abe2fb1d42c8823
size 138268 size 139719
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:916377b6b5bfaaff8bcd1a7b6bff1bded2e439aa5364b1184eec41bf39e49aa1 oid sha256:df987fbf67919cae3eaa9c767796ed51d3e58459dd421cefff0084b393e37216
size 123198 size 122485
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:1a820dde15ddb4376bc22624b150a20fdda8395c942d57b75cb16e0e24e27a10 oid sha256:81a321deafd52084901be8907e16b6c9ed1f985f986afcee4b1967544a25199e
size 149669 size 148265
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:9b7cc76e76d37b4055a3153487ce349995a4c601d15efaa4b1e8c96cdd8b704b oid sha256:fa9107df62d20d07a343b9600a7f411ef30146be4eae75a0a8659e5d5ef2617a
size 90944 size 90779
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:1a85d3a70bc441b5f0e581c04c3556f0b5d7f3e5f72e5c48cc2f8a320bc9a067 oid sha256:95ffabb3ae988f93a288fcf1729cb350a60f983385130348fc004607576bd447
size 80902 size 82948
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:1ec5118beb0691f8df57b51c372d0df418c63dc1b73233efea058da41291e9e3 oid sha256:a9eed804e596319fb87cac52da8955d2cf41c3fb11f92c0e33db65db72d84fcc
size 107915 size 107614
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:aabd8e46d32b82e9a69081de0ba2d6ea505fb1f1c9bd649b87695b33556112dd oid sha256:5027c07eea41bbbb36dd8998e58fc1860010d4a262e18dc250af63ccae500084
size 101243 size 102222
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:fcda94a55d0456e49c5f99c7ad04101ab89d1726f4d95e814e95f100002c3afa oid sha256:8bd929af18ca9f589d6cc6a2c9448708b62b70a922cb9e5ffe1e20a4fed1b672
size 140993 size 140569
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4f9577ed8a31d061a32dac2cdf34269d671f322e4979c6d217dec6b9ec3e5eb6
size 94364
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a64a7abea5bf7ac3a9e53d5101f59d496c5870304d782b109268565eb7ff8d1b
size 87262
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c48aaef513925827d7774b85fffea975d9ffdc043cf51bf9b5fa9a94726828ad
size 69059
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:597805023ec0194a04c4f7bea7780f80db38fa6805727a807710139c67bf68a9 oid sha256:a7bfc98d7d2024f103efe75384acf86d067f3dc970865bde9a79ef89e7623dfc
size 84672 size 84685
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c807972e64f0977aca1a0db35ecbeda82aaf6452889473a9dcc197b6e976f757 oid sha256:b9f1ab523823eae1bf7e339c7ecab26fa09176df26f2304bce796e2ba75e30eb
size 160832 size 163306
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:fd33425f8f03217992dbe5a9b8f5356c23c6360cabbe880f696d95eb1dd80049 oid sha256:a8895fdf5762413792e00cf685fc305a51b0cced4e888ca851aedc14482a0290
size 226953 size 228639
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:bf757b59634c398a83226d31292c5667c74493434c7e3aea00b6dac73270b1e8 oid sha256:5c884047dd87c37ae1ab336c90033aba6111272b0a98bac865bc7610a84904b7
size 232739 size 234583
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:05aaadb39c04411e8d6aec7d486e59a22dd2995245fadbe7605faf7288f1daa8 oid sha256:eef6560ed80a70c9bf0685aab1d5e98fcf5a30bd500f1c921bf53d7e4495f051
size 169803 size 172279
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c253c4c823104c55bf916c9d112ad87e4de3db24fd324a61350a834584edf275 oid sha256:d0efa2cd49b26741b545224a2eea39e07685e5959551a8f43025a48040399248
size 116667 size 116939
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:549644bff6fcada9a12199a92c111c74e18e0ff0ac6eb85d4700403103e27241 oid sha256:8f6ee652a9eab0203f0cd6878d6bb5adb6d23177b3ea48e9b73043783b5b68d0
size 105359 size 105449
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:66e014c94785dd5129c4896890f6787ac06600becf5030e4fd829a5b154fab63 oid sha256:4b390c1b74ec7f33edfbba06401d69667c4ed391ce6e042051440c82e5233792
size 120575 size 121126
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:da3e0d71f240a71947ea66d9033b7b1d9245eee7d352f7687c2992d7ae668b49 oid sha256:1cc2e48c7ada9bb111857c7104b6ac106bb74568db73b38288cbc43d495880be
size 124736 size 125491
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:2ef23872b8799a221776f2eaecdee660666a0feda377f98071f9830420c24d51 oid sha256:e791c5c530f41afc2d69614b58840c5e69fa77e2aaf822ede85878bfde292d02
size 111545 size 111094
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:a3be342a42c214c7854e236d15d0d58f66c23fd78dfce4852b07ae809df37a98 oid sha256:86d7ba9ce9b8745510e218f8b22a53e57f20459a7a50af2a0eb13eff7e8c80eb
size 129000 size 129148
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:9a89be8c8f12f3adf095b56b79961990b7f47a0a6d34c2731fac8934bc21ff7d oid sha256:fb95587da3d636ab0d1779c1f76084a2c227c4b3e7c31a530eaa939e534429c0
size 80805 size 81487
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c0f78e30a5abce712da516ad6a825c9562f0fa3c37903dc1d9c0e8be74099616 oid sha256:73f3777590b52f858bbb4b5d78870c671d76d5e94921746a0260bb3ffae2da36
size 77822 size 77246
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:f68bab9b84c6747f8ea4610da46c3c79b138bfb95d75216a62e05c28c9ce2373 oid sha256:6155979ba94debfdcb27a884dda577190a10c663feec56ba6ce68ccdc208709a
size 99103 size 98799
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:911c455aadd9bb40c83b7f759cd51f03c2d091855274550de31f35a0a9001d9a oid sha256:1baf0e4839787015887b734f7b5403f1017f21d40677aa148408e7ddd2a5efe0
size 99273 size 101441
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c01d4c5c2002e68ccb49924348380372e301ed178676df164b62f55248872bab oid sha256:4efcb97579d3cfc8140578e9c5d0a2945435013c16ad2cfff3b1de970608bd50
size 120615 size 120591
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3b1b5a3cd47c4dc67182c50681c4415a56996027002fcc7456c2f1be9b8c0a2
size 86357
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:538c1934c9d2fa998b22fad1101959d060a272088d39529f664d30c014a7e81f
size 80783
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:92dd675595b5a9cf9f90ba89d30821621dd60be7af3241fa34858b55eb0f2785
size 66398
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:a81e4fbd557c2220fc1b75086b757ca4edfcf8384dd0bdaa40f52ebae959e115 oid sha256:134b67cc2665eb48f3a9fde825c81cdf9be0b7d252f54aa6863f6bc3d709502f
size 108213 size 108305
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:074800a57b21edd7d9b54e1d01a85a9cb29b3e96045ef999a66ac386fe366220 oid sha256:0c58d7a7f01c75c0d943404ccfb84e494924ebf159e9db66a2101b76800b211f
size 235638 size 231174
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:7602c21904a1b961e3841bbf881a0e972fcfe075d68502c95583a3e4a42a9860 oid sha256:ef0d509ad85ab4461c86fe5687377a3a12045be68e5cc6441e101a0f7a2fec92
size 227310 size 215240
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:d1039489d9d16dcc6367118caf0621aacd96994eb27251f2b05998824fca45d5 oid sha256:8b1f4eba9e53a005cc1adffd93cc15b73a9dfe8408b467127edde2b80e710dd2
size 234278 size 221063
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:ef8aaf01bff6866112fa5c34c53cce291811be26a12c6ec16011a92987074cb5 oid sha256:0e6e559bebe737b75e5df7c705203cdee7647441f631743bf7d33de0ce5244df
size 239739 size 227071
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:4781fa334f9c08adf7ba7e3b0885e9b04a7f28c7e1e407553a74171570775a41 oid sha256:6a4024d9401d54a37dda66f36ba0972dcf57c2fd07f4d3c2bc479ca1a4108573
size 162791 size 163180
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c7cdba22264783b0c6dcdab920ad76536d14607386407699064bdaa74e823ada oid sha256:9a99af45d33c1c8b9277494aa0f2b07bf0108891a78594cb16e7b2ad3c84be61
size 144165 size 143610
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:06c2c94823623f270e9b35ba02cd4f85c1bcbe3471e3a19ac45137afb26c0763 oid sha256:14b719940a2d55d51291830227a0b9e9f7a5a5fe942a3ecc119407f40458398a
size 166192 size 169433
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:bf95a30eb5467febc2d83044e336f9da867266c1fc3c59c1656ded916f6bad68 oid sha256:d721ab3fb80283367fb3b0573d223589197767e98d03da7d860b6107d59ee99b
size 175545 size 163565
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:05805475c80e08fc4060eaf32dcc7a2d775c1dd81504000016b766ec386267c7 oid sha256:aebe694c734af52a98cf0b881d440a086f04c65d7a132afc951a668c7183c864
size 153202 size 152113
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:13a6ddd1704e0ff6c6810b2001faa6922099b952dce95773c8013c9d8df00c78 oid sha256:60d93b489ac8051eb8ceb3deaca5ee050bd7b3f22350fe3eebb680f0f60a31bf
size 179534 size 178195
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:186bf0ae6879b52dbe2b995a2cb589aac5f41aca525adc0cea8cacc7d561ad35 oid sha256:c2af92bb5c92ae8c680fc1f6c89d1ca037faa52f4a498169d74490518e6298fd
size 93837 size 93774
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:19d1f76b44e8dc394ce0c1bf5df4874615e5e534fe7e5a488a095aa7608c044f oid sha256:002fdf44ed4ee5ee2bc4ecb72f21bc726f655dfd1abdf29697f4b4bd31dd8265
size 85855 size 85629
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:5bcf4fd1f00368481f8688abdb60bffe8aa65234d64f6bf44d9ff9dfe0421b25 oid sha256:56e470c713c4b51e58c3027c66039d191a63d81d1ec04809c6cdc087ed088c50
size 141085 size 140627
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:fe711a53de7a85957694d9f19ef81f99ec3e51dddcda0f6537d4fcfd7ceb9906 oid sha256:705b68a0dadbbc56003594a768b37400368efc4c6bd78e6a908b2d32ff383746
size 126350 size 127571
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:5292689319bfed500832759b2ecf924eacbd6e3c413f520b52f6fe1e2e1c9900 oid sha256:2e014fead3ae053429a182e79b1cf3951323977d602f4c45667cb5ba2ba3057a
size 164822 size 165296
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a82fdc687804e32734a290ec1d02d3d8230efc3d1b182cd0666e8c824db9ee2
size 98594
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f61b2f1e18df77cbb1c65ab803a14c2db1b2bc0718cde1187266eb6796954e9
size 91945
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df5cdbe45d6259ab51d151deaca7a558ac7b370c98679cb0c47205906c608a97
size 71474
@@ -83,7 +83,7 @@ class RoomNotificationSettingsScreenViewModelTests: XCTestCase {
notificationSettingsProxyMock.callbacks.send(.settingsDidChange) notificationSettingsProxyMock.callbacks.send(.settingsDidChange)
try await deferred.fulfill() try await deferred.fulfill()
let deferredIsRestoringDefaultSettings = deferFulfillment(context.$viewState.map(\.isRestoringDefautSetting) let deferredIsRestoringDefaultSettings = deferFulfillment(context.$viewState.map(\.isRestoringDefaultSetting)
.removeDuplicates() .removeDuplicates()
.collect(3).first()) .collect(3).first())
viewModel.state.bindings.allowCustomSetting = false viewModel.state.bindings.allowCustomSetting = false
+1
View File
@@ -0,0 +1 @@
Use Compound ListRow instead of .xyzStyle(.compoundRow)
+1 -1
View File
@@ -51,7 +51,7 @@ packages:
path: DesignKit path: DesignKit
Compound: Compound:
url: https://github.com/vector-im/compound-ios url: https://github.com/vector-im/compound-ios
revision: 89e3ed5adef33be7eb65137b861833ffae64f961 revision: 50bb7cf313bd1ad17201fc7e4c1184737a0f44c2
# path: ../compound-ios # path: ../compound-ios
AnalyticsEvents: AnalyticsEvents:
url: https://github.com/matrix-org/matrix-analytics-events url: https://github.com/matrix-org/matrix-analytics-events