-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♿️ - Settings #546
♿️ - Settings #546
Changes from all commits
3768fbe
9217fd3
d3a8246
e232781
e3b2ce7
a82ddec
b6836d9
89dc48d
35c3ac2
02d5ff3
ac4d24e
9649519
93d80ca
5be8d8f
d9728de
b8133be
853567a
e303019
9d3e92d
59542ff
1ceb7c3
8b8f21b
c10d5ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,21 @@ internal final class SettingsFollowCell: UITableViewCell, ValueCell { | |
@IBOutlet fileprivate weak var followingSwitch: UISwitch! | ||
@IBOutlet fileprivate var separatorView: [UIView]! | ||
|
||
internal func configureWith(value user: User) { | ||
self.viewModel.inputs.configureWith(user: user) | ||
override func awakeFromNib() { | ||
super.awakeFromNib() | ||
|
||
_ = self | ||
|> \.accessibilityElements .~ [self.followingSwitch] | ||
|
||
_ = self.followingSwitch | ||
|> \.accessibilityLabel %~ { _ in Strings.Following() } | ||
} | ||
|
||
internal func configureWith(value: SettingsPrivacyStaticCellValue) { | ||
self.viewModel.inputs.configureWith(user: value.user) | ||
|
||
_ = self.followingSwitch | ||
|> \.accessibilityHint .~ value.cellType.description | ||
} | ||
|
||
internal override func bindStyles() { | ||
|
@@ -63,6 +76,10 @@ internal final class SettingsFollowCell: UITableViewCell, ValueCell { | |
self.followingSwitch.rac.on = self.viewModel.outputs.followingPrivacyOn | ||
} | ||
|
||
func toggleOn(animated: Bool = true) { | ||
self.followingSwitch.setOn(true, animated: animated) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question. So this method could be more generic (i.e. |
||
} | ||
|
||
@IBAction func followingPrivacySwitchTapped(_ followingPrivacySwitch: UISwitch) { | ||
self.viewModel.inputs.followTapped(on: followingPrivacySwitch.isOn) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently this string is not localized, but based on the conversation we had with @peat it should not delay merging stuff to
master
/:shipit: