mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-05-17 20:12:41 +00:00
Added "Moved To" button to account details for accounts that have moved
This commit is contained in:
parent
8778fa9309
commit
fb1516a409
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue