A few small tweaks. (#774)

- Use ShareLink instead of InviteFriendsCoordinator.
- Fix a string in the user menu
- Show the word Notification as the notification's body.

---------

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
This commit is contained in:
Doug
2023-04-06 12:44:16 +01:00
committed by GitHub
parent fae6602797
commit 0911f9ba89
7 changed files with 15 additions and 60 deletions
@@ -122,11 +122,13 @@ struct HomeScreen: View {
}
}
Section {
Button(action: inviteFriends) {
Label(L10n.actionInvite, systemImage: "square.and.arrow.up")
if let permalink = context.viewState.invitePermalink {
ShareLink(item: permalink) {
Label(L10n.actionInvite, systemImage: "square.and.arrow.up")
}
}
Button(action: feedback) {
Label(L10n.actionReportBug, systemImage: "questionmark.circle")
Label(L10n.commonReportABug, systemImage: "questionmark.circle")
}
}
Section {
@@ -201,10 +203,6 @@ struct HomeScreen: View {
context.send(viewAction: .userMenu(action: .settings))
}
private func inviteFriends() {
context.send(viewAction: .userMenu(action: .inviteFriends))
}
private func startChat() {
context.send(viewAction: .startChat)
}