browse, player: continue group fix

This commit is contained in:
Yuriy Liskov
2023-09-09 23:30:36 +03:00
parent c7e2c8bb39
commit 71f7912e55
3 changed files with 22 additions and 22 deletions

View File

@@ -105,13 +105,6 @@ public class SuggestionsController extends PlayerEventListenerHelper {
VideoGroup group = item.getGroup();
if (group == null || mLastScrollGroup == group.getMediaGroup()) {
Log.d(TAG, "Can't continue group. Another action is running.");
return;
}
mLastScrollGroup = group.getMediaGroup();
continueGroup(group);
}
@@ -165,9 +158,17 @@ public class SuggestionsController extends PlayerEventListenerHelper {
private void continueGroup(VideoGroup group, OnVideoGroup callback, boolean showLoading) {
if (group == null) {
Log.e(TAG, "Can't continue group. The group is null.");
return;
}
if (mLastScrollGroup == group.getMediaGroup()) {
Log.d(TAG, "Can't continue group. Another action is running.");
return;
}
mLastScrollGroup = group.getMediaGroup();
Log.d(TAG, "continueGroup: start continue group: " + group.getTitle());
if (showLoading) {

View File

@@ -408,20 +408,6 @@ public class BrowsePresenter extends BasePresenter<BrowseView> implements Sectio
VideoGroup group = item.getGroup();
if (group == null || group.getMediaGroup() == null) {
Log.e(TAG, "Can't scroll. Video group is null.");
return;
}
if (mLastScrollGroup == group.getMediaGroup()) {
Log.d(TAG, "Can't continue group. Another action is running.");
return;
}
mLastScrollGroup = group.getMediaGroup();
Log.d(TAG, "onScrollEnd. Group title: " + group.getTitle());
continueGroup(group);
}
@@ -747,6 +733,18 @@ public class BrowsePresenter extends BasePresenter<BrowseView> implements Sectio
return;
}
if (group == null) {
Log.e(TAG, "Can't continue group. The group is null.");
return;
}
if (mLastScrollGroup == group.getMediaGroup()) {
Log.d(TAG, "Can't continue group. Another action is running.");
return;
}
mLastScrollGroup = group.getMediaGroup();
Log.d(TAG, "continueGroup: start continue group: " + group.getTitle());
// Small amount of items == small load time. Loading bar are useless?

View File

@@ -93,7 +93,8 @@ public final class ProgressBarManager {
if (mEnableProgressBar) {
mIsShowing = true;
mHandler.removeCallbacks(hideRunnable);
mHandler.postDelayed(showRunnable, mInitialDelay);
//mHandler.postDelayed(showRunnable, mInitialDelay);
mHandler.post(showRunnable);
}
}