NetNewsWire/iOS/Settings/BrowserCell.swift
Stuart Breckenridge 08a1120e00
Adds app default option
Adds app defaults option for controlling link opening preferences.

Adds browser logic and images.

Browser Manager Updates

- Handles deletion of current browser
- Fixes detection of installed browsers by moving URL Types to LSApplicationQuery
- Updates icons to glyphs
- Context menus update

tidy up

- removes browser specific options and offers in-app or default browser options (can be enabled via a bool)
- adds 1Password as an option
- removes custom wording on context menus

Fixes

- makes sure browser options are available on iPad
- uses VibrantCell
- Changes Settings title to "Open Links In"
2021-08-23 23:01:48 +08:00

48 lines
1.1 KiB
Swift

//
// BrowserCell.swift
// NetNewsWire-iOS
//
// Created by Stuart Breckenridge on 22/8/21.
// Copyright © 2021 Ranchero Software. All rights reserved.
//
import UIKit
class BrowserCell: VibrantTableViewCell {
@IBOutlet weak var browserName: UILabel!
private var browser: Browser!
override func updateVibrancy(animated: Bool) {
super.updateVibrancy(animated: animated)
updateLabelVibrancy(browserName, color: labelColor, animated: animated)
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
func configure(with browser: Browser) {
browserName.text = browser.displayName
self.browser = browser
if BrowserManager.shared.currentBrowser().browserID == browser.browserID {
accessoryType = .checkmark
} else {
accessoryType = .none
}
}
func updateBrowserSelection() {
BrowserManager.shared.currentBrowserPreference = self.browser.browserID
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}