diff --git a/IceCubesApp/Resources/Localization/Localizable.xcstrings b/IceCubesApp/Resources/Localization/Localizable.xcstrings index cd84e0f3..16aa35cd 100644 --- a/IceCubesApp/Resources/Localization/Localizable.xcstrings +++ b/IceCubesApp/Resources/Localization/Localizable.xcstrings @@ -17067,6 +17067,23 @@ } } }, + "account.movedto.redirect-%@" : { + "extractionState" : "manual", + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Umgezogen nach %@" + } + }, + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Moved To %@" + } + } + } + }, "account.post.pinned" : { "extractionState" : "manual", "localizations" : { @@ -79155,4 +79172,4 @@ } }, "version" : "1.0" -} +} \ No newline at end of file diff --git a/Packages/Account/Sources/Account/AccountDetailHeaderView.swift b/Packages/Account/Sources/Account/AccountDetailHeaderView.swift index 1c636e51..33a851c5 100644 --- a/Packages/Account/Sources/Account/AccountDetailHeaderView.swift +++ b/Packages/Account/Sources/Account/AccountDetailHeaderView.swift @@ -207,6 +207,7 @@ struct AccountDetailHeaderView: View { .foregroundStyle(.secondary) .textSelection(.enabled) .accessibilityRespondsToUserInteraction(false) + movedToView joinedAtView } .accessibilityElement(children: .contain) @@ -311,6 +312,17 @@ struct AccountDetailHeaderView: View { } } + @ViewBuilder + private var movedToView: some View { + if let movedTo = viewModel.account?.moved { + Button("account.movedto.redirect-\("@\(movedTo.acct)")") { + routerPath.navigate(to: .accountDetailWithAccount(account: movedTo)) + } + .font(.scaledCallout) + .foregroundColor(.accentColor) + } + } + @ViewBuilder private func makeNoteView(_ note: String) -> some View { VStack(alignment: .leading, spacing: 4) {