mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-01-31 17:45:17 +01:00
Fix warnings
This commit is contained in:
parent
22d0b45be7
commit
120b9e18b1
@ -14,7 +14,7 @@ extension Mastodon.Entity.Account {
|
||||
let isAnimated = !UserDefaults.shared.preferredStaticEmoji
|
||||
|
||||
var dict = MastodonContent.Emojis()
|
||||
for emoji in emojis ?? [] {
|
||||
for emoji in emojis {
|
||||
dict[emoji.shortcode] = isAnimated ? emoji.url : emoji.staticURL
|
||||
}
|
||||
return dict
|
||||
|
@ -10,7 +10,6 @@ import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import MastodonSDK
|
||||
import MastodonCore
|
||||
|
||||
final public class FeedFetchedResultsController {
|
||||
|
||||
|
@ -314,7 +314,7 @@ extension ComposeContentViewModel {
|
||||
self.avatarURL = account.avatarImageURL()
|
||||
|
||||
do {
|
||||
let content = MastodonContent(content: account.displayNameWithFallback, emojis: (account.emojis ?? []).asDictionary)
|
||||
let content = MastodonContent(content: account.displayNameWithFallback, emojis: account.emojis.asDictionary)
|
||||
let metaContent = try MastodonMetaContent.convert(document: content)
|
||||
self.name = metaContent
|
||||
} catch {
|
||||
|
@ -20,7 +20,7 @@ extension FamiliarFollowersDashboardView {
|
||||
viewModel.emojis = {
|
||||
var array: [Mastodon.Entity.Emoji] = []
|
||||
for account in accounts {
|
||||
array.append(contentsOf: account.emojis ?? [])
|
||||
array.append(contentsOf: account.emojis)
|
||||
}
|
||||
return array.asDictionary
|
||||
}()
|
||||
|
@ -91,7 +91,7 @@ extension StatusView {
|
||||
let account = authenticationBox.authentication.account() {
|
||||
|
||||
let name = account.displayNameWithFallback
|
||||
let emojis = account.emojis ?? []
|
||||
let emojis = account.emojis
|
||||
|
||||
viewModel.header = {
|
||||
let text = L10n.Common.Controls.Status.userReblogged(name)
|
||||
@ -106,7 +106,7 @@ extension StatusView {
|
||||
}()
|
||||
} else if status.reblog != nil {
|
||||
let name = status.entity.account.displayNameWithFallback
|
||||
let emojis = status.entity.account.emojis ?? []
|
||||
let emojis = status.entity.account.emojis
|
||||
|
||||
viewModel.header = {
|
||||
let text = L10n.Common.Controls.Status.userReblogged(name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user