Replace more users with account (IOS-192)
In Edit and notification
This commit is contained in:
parent
4764116efc
commit
ab7b0584dd
|
@ -101,12 +101,12 @@ extension NotificationService {
|
|||
return try await managedObjectContext.perform {
|
||||
var items: [UIApplicationShortcutItem] = []
|
||||
for authentication in AuthenticationServiceProvider.shared.authentications {
|
||||
guard let user = authentication.user(in: managedObjectContext) else { continue }
|
||||
guard let account = authentication.account() else { continue }
|
||||
let accessToken = authentication.userAccessToken
|
||||
let count = UserDefaults.shared.getNotificationCountWithAccessToken(accessToken: accessToken)
|
||||
guard count > 0 else { continue }
|
||||
|
||||
let title = "@\(user.acctWithDomain)"
|
||||
let title = "@\(account.acctWithDomain)"
|
||||
let subtitle = L10n.A11y.Plural.Count.Unread.notification(count)
|
||||
|
||||
let item = UIApplicationShortcutItem(
|
||||
|
|
|
@ -11,7 +11,7 @@ public final class MastodonEditStatusPublisher: NSObject, ProgressReporting {
|
|||
|
||||
// Input
|
||||
public let statusID: Status.ID
|
||||
public let author: ManagedObjectRecord<MastodonUser>
|
||||
public let author: Mastodon.Entity.Account
|
||||
|
||||
// content warning
|
||||
public let isContentWarningComposing: Bool
|
||||
|
@ -41,7 +41,7 @@ public final class MastodonEditStatusPublisher: NSObject, ProgressReporting {
|
|||
|
||||
public init(
|
||||
statusID: Status.ID,
|
||||
author: ManagedObjectRecord<MastodonUser>,
|
||||
author: Mastodon.Entity.Account,
|
||||
isContentWarningComposing: Bool,
|
||||
contentWarning: String,
|
||||
content: String,
|
||||
|
|
Loading…
Reference in New Issue