Show tag content on long click to avoid misclicks
This commit is contained in:
1 parent
0ff40d3d38
commit
30fc750e17
1 file changed
+5
-3
@@ -721,15 +721,17 @@ fun BelowHeader(galleryDetail: GalleryDetail, voteTag: VoteTag) {
|
||||
val upTag = stringResource(R.string.tag_vote_up)
|
||||
val downTag = stringResource(R.string.tag_vote_down)
|
||||
val withDraw = stringResource(R.string.tag_vote_withdraw)
|
||||
fun search(tag: String) = navigate(ListUrlBuilder(mode = ListUrlBuilder.MODE_TAG, mKeyword = tag).asDst())
|
||||
GalleryTags(
|
||||
tagGroups = tags,
|
||||
onTagClick = {
|
||||
navigate(ListUrlBuilder(mode = ListUrlBuilder.MODE_TAG, mKeyword = it).asDst())
|
||||
},
|
||||
onTagClick = ::search,
|
||||
onTagLongClick = { tag, translation, vote ->
|
||||
val rawValue = tag.substringAfter(':')
|
||||
launchIO {
|
||||
awaitSelectAction {
|
||||
onSelect(ctx.getString(R.string.search_bar_hint, tag)) {
|
||||
withUIContext { search(tag) }
|
||||
}
|
||||
onSelect(copy) {
|
||||
addTextToClipboard(tag)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user