mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-21 15:50:59 +00:00
Style changes
This commit is contained in:
parent
4d7a3d690b
commit
30cedb503f
6 changed files with 7 additions and 7 deletions
|
@ -50,7 +50,7 @@ public extension Identity {
|
|||
|
||||
var handle: String {
|
||||
if let account = account, let host = account.url.host {
|
||||
return account.url.lastPathComponent + "@" + host
|
||||
return account.url.lastPathComponent.appending("@").appending(host)
|
||||
}
|
||||
|
||||
return instance?.title ?? url.host ?? url.absoluteString
|
||||
|
|
|
@ -50,11 +50,11 @@ extension Array where Element == Filter {
|
|||
|
||||
if $0.wholeWord {
|
||||
if expression.range(of: #"^[\w]"#, options: .regularExpression) != nil {
|
||||
expression = #"\b"# + expression
|
||||
expression = #"\b"#.appending(expression)
|
||||
}
|
||||
|
||||
if expression.range(of: #"[\w]$"#, options: .regularExpression) != nil {
|
||||
expression += #"\b"#
|
||||
expression.append(#"\b"#)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ private extension Secrets {
|
|||
}
|
||||
|
||||
func scopedKey(item: Item) -> String {
|
||||
identityId.uuidString + "." + item.rawValue
|
||||
identityId.uuidString.appending(".").appending(item.rawValue)
|
||||
}
|
||||
|
||||
func set(_ data: SecretsStorable, forItem item: Item) throws {
|
||||
|
|
|
@ -27,7 +27,7 @@ public extension InstanceURLService {
|
|||
|
||||
if text.hasPrefix(Self.httpsPrefix), let prefixedURL = URL(string: text) {
|
||||
url = prefixedURL
|
||||
} else if let unprefixedURL = URL(string: Self.httpsPrefix + text) {
|
||||
} else if let unprefixedURL = URL(string: Self.httpsPrefix.appending(text)) {
|
||||
url = unprefixedURL
|
||||
} else {
|
||||
return .failure(URLError(.badURL))
|
||||
|
|
|
@ -72,7 +72,7 @@ public extension StatusViewModel {
|
|||
sensitive || identification.identity.preferences.readingExpandMedia == .hideAll
|
||||
}
|
||||
|
||||
var accountName: String { "@" + statusService.status.displayStatus.account.acct }
|
||||
var accountName: String { "@".appending(statusService.status.displayStatus.account.acct) }
|
||||
|
||||
var avatarURL: URL {
|
||||
if !identification.appPreferences.shouldReduceMotion,
|
||||
|
|
|
@ -156,7 +156,7 @@ private extension Timeline {
|
|||
case let .list(list):
|
||||
return list.title
|
||||
case let .tag(tag):
|
||||
return "#" + tag
|
||||
return "#".appending(tag)
|
||||
case .profile:
|
||||
return ""
|
||||
case .favorites:
|
||||
|
|
Loading…
Reference in a new issue