mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 00:01:00 +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 {
|
var handle: String {
|
||||||
if let account = account, let host = account.url.host {
|
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
|
return instance?.title ?? url.host ?? url.absoluteString
|
||||||
|
|
|
@ -50,11 +50,11 @@ extension Array where Element == Filter {
|
||||||
|
|
||||||
if $0.wholeWord {
|
if $0.wholeWord {
|
||||||
if expression.range(of: #"^[\w]"#, options: .regularExpression) != nil {
|
if expression.range(of: #"^[\w]"#, options: .regularExpression) != nil {
|
||||||
expression = #"\b"# + expression
|
expression = #"\b"#.appending(expression)
|
||||||
}
|
}
|
||||||
|
|
||||||
if expression.range(of: #"[\w]$"#, options: .regularExpression) != nil {
|
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 {
|
func scopedKey(item: Item) -> String {
|
||||||
identityId.uuidString + "." + item.rawValue
|
identityId.uuidString.appending(".").appending(item.rawValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
func set(_ data: SecretsStorable, forItem item: Item) throws {
|
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) {
|
if text.hasPrefix(Self.httpsPrefix), let prefixedURL = URL(string: text) {
|
||||||
url = prefixedURL
|
url = prefixedURL
|
||||||
} else if let unprefixedURL = URL(string: Self.httpsPrefix + text) {
|
} else if let unprefixedURL = URL(string: Self.httpsPrefix.appending(text)) {
|
||||||
url = unprefixedURL
|
url = unprefixedURL
|
||||||
} else {
|
} else {
|
||||||
return .failure(URLError(.badURL))
|
return .failure(URLError(.badURL))
|
||||||
|
|
|
@ -72,7 +72,7 @@ public extension StatusViewModel {
|
||||||
sensitive || identification.identity.preferences.readingExpandMedia == .hideAll
|
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 {
|
var avatarURL: URL {
|
||||||
if !identification.appPreferences.shouldReduceMotion,
|
if !identification.appPreferences.shouldReduceMotion,
|
||||||
|
|
|
@ -156,7 +156,7 @@ private extension Timeline {
|
||||||
case let .list(list):
|
case let .list(list):
|
||||||
return list.title
|
return list.title
|
||||||
case let .tag(tag):
|
case let .tag(tag):
|
||||||
return "#" + tag
|
return "#".appending(tag)
|
||||||
case .profile:
|
case .profile:
|
||||||
return ""
|
return ""
|
||||||
case .favorites:
|
case .favorites:
|
||||||
|
|
Loading…
Reference in a new issue