1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-22 11:02:35 +01:00

#6081: Disable feed click handlers during refresh

This patch changes click handlers for feed (Whats new) so that they do
nothing while the feed is refreshing and the items being clicked are not
visible.
This commit is contained in:
Douile 2021-06-22 19:42:20 +01:00
parent 62b4f333bb
commit cb1a138140
No known key found for this signature in database
GPG Key ID: DC9D70626CEF33D0

View File

@ -363,7 +363,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
private val listenerStreamItem = object : OnItemClickListener, OnItemLongClickListener {
override fun onItemClick(item: Item<*>, view: View) {
if (item is StreamItem) {
if (item is StreamItem && !feedBinding.swipeRefreshLayout.isRefreshing) {
val stream = item.streamWithState.stream
NavigationHelper.openVideoDetailFragment(
requireContext(), fm,
@ -373,7 +373,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
}
override fun onItemLongClick(item: Item<*>, view: View): Boolean {
if (item is StreamItem) {
if (item is StreamItem && !feedBinding.swipeRefreshLayout.isRefreshing) {
showStreamDialog(item.streamWithState.stream.toStreamInfoItem())
return true
}