Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alfogrillo committed Feb 1, 2023
1 parent 832a8ba commit 241a1fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 241a1fc

Please sign in to comment.