mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-01-28 16:20:10 +01:00
Use constant (IOS-192)
This commit is contained in:
parent
52f5458364
commit
49af28eeba
@ -11,6 +11,7 @@ import CoreData
|
||||
import CoreDataStack
|
||||
import Pageboy
|
||||
import MastodonCore
|
||||
import MastodonSDK
|
||||
|
||||
protocol MediaPreviewPage: UIViewController {
|
||||
func setShowingChrome(_ showingChrome: Bool)
|
||||
@ -152,7 +153,7 @@ extension MediaPreviewViewModel {
|
||||
case .profileBanner(let item):
|
||||
guard let assertURL = item.assetURL else { return false }
|
||||
|
||||
return assertURL.hasSuffix("missing.png") == false
|
||||
return assertURL.hasSuffix(Mastodon.Entity.Account.missingImageName) == false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,6 @@ final class ProfileHeaderViewController: UIViewController, NeedsDependency, Medi
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
view.setContentHuggingPriority(.required - 1, for: .vertical)
|
||||
|
||||
view.backgroundColor = .systemBackground
|
||||
|
@ -144,7 +144,7 @@ extension Mastodon.Entity.Account {
|
||||
}
|
||||
|
||||
public func avatarImageURLWithFallback(domain: String) -> URL {
|
||||
return avatarImageURL() ?? URL(string: "https://\(domain)/avatars/original/missing.png")!
|
||||
return avatarImageURL() ?? URL(string: "https://\(domain)/avatars/original/\(Self.missingImageName)")!
|
||||
}
|
||||
|
||||
public var displayNameWithFallback: String {
|
||||
@ -163,3 +163,7 @@ extension Mastodon.Entity.Account {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension Mastodon.Entity.Account {
|
||||
public static let missingImageName = "missing.png"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user