mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-01-02 03:50:37 -06:00
browse, player: continue group fix
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user