Adds AddSourceViewController to add sources by URL or from list of recommended sources

This commit is contained in:
Riley Testut
2023-10-18 18:56:40 -05:00
committed by Magesh K
parent 2aebaf80e0
commit 98125e93aa
13 changed files with 1096 additions and 23 deletions

View File

@@ -154,9 +154,21 @@ extension AppBannerView
{
self.style = .source
self.titleLabel.text = source.name
let subtitle: String
if let text = source.subtitle
{
subtitle = text
}
else if let scheme = source.sourceURL.scheme
{
subtitle = source.sourceURL.absoluteString.replacingOccurrences(of: scheme + "://", with: "")
}
else
{
subtitle = source.sourceURL.absoluteString
}
let subtitle = source.subtitle ?? source.sourceURL.absoluteString
self.titleLabel.text = source.name
self.subtitleLabel.text = subtitle
let tintColor = source.effectiveTintColor ?? .altPrimary

View File

@@ -66,6 +66,8 @@ class PillButton: UIButton
var style: Style = .pill {
didSet {
guard self.style != oldValue else { return }
if self.style == .custom
{
// Reset insets for custom style.