diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryDetailContent.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryDetailContent.kt index 37586d287..a736e066e 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryDetailContent.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryDetailContent.kt @@ -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) }