Fix rebase issues

This commit is contained in:
Alfonso Grillo 2023-02-01 11:41:59 +01:00
parent 832a8bab78
commit 241a1fcb7f
2 changed files with 5 additions and 3 deletions

View file

@ -99,8 +99,8 @@ final class NotificationSettingsViewModelTests: XCTestCase {
XCTAssertEqual(viewModel.viewState.selectionState[.oneToOneRoom], true)
// the oneToOneRoom rule should be flagged as "out of sync"
XCTAssertTrue(self.viewModel.isRuleOutOfSync(.oneToOneRoom))
XCTAssertFalse(self.viewModel.isRuleOutOfSync(.allOtherMessages))
XCTAssertTrue(viewModel.isRuleOutOfSync(.oneToOneRoom))
XCTAssertFalse(viewModel.isRuleOutOfSync(.allOtherMessages))
}
}

View file

@ -35,7 +35,9 @@ struct NotificationSettings<BottomSection: View>: View {
VStack(alignment: .leading, spacing: 4) {
let checked = viewModel.viewState.selectionState[ruleId] ?? false
FormPickerItem(title: ruleId.title, selected: checked) {
viewModel.update(ruleID: ruleId, isChecked: !checked)
Task {
await viewModel.update(ruleID: ruleId, isChecked: !checked)
}
}
if viewModel.isRuleOutOfSync(ruleId) {