Skip to content

Commit

Permalink
re-enabled navigation from inbox items
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBAndrews committed Oct 31, 2023
1 parent d88f95c commit 7219826
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 25 deletions.
30 changes: 18 additions & 12 deletions Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Mention View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,25 @@ struct InboxMentionView: View {
var iconName: String { mention.personMention.read ? "quote.bubble" : "quote.bubble.fill" }

var body: some View {
content
.padding(AppConstants.postAndCommentSpacing)
.background(Color(uiColor: .systemBackground))
.contentShape(Rectangle())
.addSwipeyActions(mention.swipeActions(unreadTracker: unreadTracker, editorTracker: editorTracker))
.contextMenu {
ForEach(mention.menuFunctions(
unreadTracker: unreadTracker,
editorTracker: editorTracker
)) { item in
MenuButton(menuFunction: item, confirmDestructive: nil)
NavigationLink(.lazyLoadPostLinkWithContext(.init(
post: mention.post,
scrollTarget: mention.comment.id
))) {
content
.padding(AppConstants.postAndCommentSpacing)
.background(Color(uiColor: .systemBackground))
.contentShape(Rectangle())
.addSwipeyActions(mention.swipeActions(unreadTracker: unreadTracker, editorTracker: editorTracker))
.contextMenu {
ForEach(mention.menuFunctions(
unreadTracker: unreadTracker,
editorTracker: editorTracker
)) { item in
MenuButton(menuFunction: item, confirmDestructive: nil)
}
}
}
}
.buttonStyle(EmptyButtonStyle())
}

var content: some View {
Expand Down
30 changes: 18 additions & 12 deletions Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Reply View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,25 @@ struct InboxReplyView: View {
var iconName: String { reply.commentReply.read ? "arrowshape.turn.up.right" : "arrowshape.turn.up.right.fill" }

var body: some View {
content
.padding(AppConstants.postAndCommentSpacing)
.background(Color(uiColor: .systemBackground))
.contentShape(Rectangle())
.addSwipeyActions(reply.swipeActions(unreadTracker: unreadTracker, editorTracker: editorTracker))
.contextMenu {
ForEach(reply.menuFunctions(
unreadTracker: unreadTracker,
editorTracker: editorTracker
)) { item in
MenuButton(menuFunction: item, confirmDestructive: nil)
NavigationLink(.lazyLoadPostLinkWithContext(.init(
post: reply.post,
scrollTarget: reply.comment.id
))) {
content
.padding(AppConstants.postAndCommentSpacing)
.background(Color(uiColor: .systemBackground))
.contentShape(Rectangle())
.addSwipeyActions(reply.swipeActions(unreadTracker: unreadTracker, editorTracker: editorTracker))
.contextMenu {
ForEach(reply.menuFunctions(
unreadTracker: unreadTracker,
editorTracker: editorTracker
)) { item in
MenuButton(menuFunction: item, confirmDestructive: nil)
}
}
}
}
.buttonStyle(EmptyButtonStyle())
}

var content: some View {
Expand Down
2 changes: 1 addition & 1 deletion Mlem/Views/Tabs/Inbox/Inbox View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct InboxView: View {
.padding(.horizontal, AppConstants.postAndCommentSpacing)
.padding(.top, AppConstants.postAndCommentSpacing)

ScrollView(showsIndicators: true) {
ScrollView(showsIndicators: false) {
if errorOccurred {
errorView()
} else {
Expand Down

0 comments on commit 7219826

Please sign in to comment.