Skip to content

Commit

Permalink
Merge pull request #7069 from vector-im/aleksandrs/7035_session_list_…
Browse files Browse the repository at this point in the history
…item_tap_fixup

Fixup session list item is not tappable everywhere
  • Loading branch information
Aleksandrs Proskurins authored Nov 11, 2022
2 parents 3f3d81b + f113576 commit 3b66145
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@ struct UserSessionListItem: View {
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 16)
}
.contentShape(Rectangle())
.onTapGesture {
onBackgroundTap?(viewData.sessionId)
}
.onLongPressGesture {
onBackgroundLongPress?(viewData.sessionId)
}
}
.simultaneousGesture(LongPressGesture().onEnded { _ in
onBackgroundLongPress?(viewData.sessionId)
})
.simultaneousGesture(TapGesture().onEnded {
onBackgroundTap?(viewData.sessionId)
})
.frame(maxWidth: .infinity, alignment: .leading)
.accessibilityIdentifier("UserSessionListItem_\(viewData.sessionId)")
}
Expand Down

0 comments on commit 3b66145

Please sign in to comment.