Revert "Disable the Mark as Read on Scroll preferences temporarily"

This reverts commit 7608bf2ae6.
This commit is contained in:
everhardt
2021-11-24 22:37:55 +01:00
parent 2bdeab2248
commit f10fe6c9b5
3 changed files with 194 additions and 111 deletions

View File

@@ -19,6 +19,7 @@ class SettingsViewController: UITableViewController {
@IBOutlet weak var timelineSortOrderSwitch: UISwitch!
@IBOutlet weak var groupByFeedSwitch: UISwitch!
@IBOutlet weak var refreshClearsReadArticlesSwitch: UISwitch!
@IBOutlet weak var markArticlesAsReadOnScrollSwitch: UISwitch!
@IBOutlet weak var articleThemeDetailLabel: UILabel!
@IBOutlet weak var confirmMarkAllAsReadSwitch: UISwitch!
@IBOutlet weak var showFullscreenArticlesSwitch: UISwitch!
@@ -68,6 +69,12 @@ class SettingsViewController: UITableViewController {
}
if AppDefaults.shared.markArticlesAsReadOnScroll {
markArticlesAsReadOnScrollSwitch.isOn = true
} else {
markArticlesAsReadOnScrollSwitch.isOn = false
}
articleThemeDetailLabel.text = ArticleThemesManager.shared.currentTheme.name
if AppDefaults.shared.confirmMarkAllAsRead {
@@ -327,6 +334,14 @@ class SettingsViewController: UITableViewController {
}
}
@IBAction func switchMarkArticlesAsReadOnScroll(_ sender: Any) {
if markArticlesAsReadOnScrollSwitch.isOn {
AppDefaults.shared.markArticlesAsReadOnScroll = true
} else {
AppDefaults.shared.markArticlesAsReadOnScroll = false
}
}
@IBAction func switchConfirmMarkAllAsRead(_ sender: Any) {
if confirmMarkAllAsReadSwitch.isOn {
AppDefaults.shared.confirmMarkAllAsRead = true