Some fixes
This commit is contained in:
parent
23875a2ceb
commit
257a00fa1e
|
@ -71,6 +71,7 @@ public class SepiaSearchActivity extends AppCompatActivity {
|
||||||
sepiaSearchVideo.setCount(String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE)));
|
sepiaSearchVideo.setCount(String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE)));
|
||||||
sepiaSearchVideo.setDurationMin(0);
|
sepiaSearchVideo.setDurationMin(0);
|
||||||
sepiaSearchVideo.setDurationMax(9999999);
|
sepiaSearchVideo.setDurationMax(9999999);
|
||||||
|
sepiaSearchVideo.setStart("0");
|
||||||
sepiaSearchVideo.setSort("-match");
|
sepiaSearchVideo.setSort("-match");
|
||||||
if (getSupportActionBar() != null)
|
if (getSupportActionBar() != null)
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
@ -319,6 +320,7 @@ public class SepiaSearchActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private void makeSearch(){
|
private void makeSearch(){
|
||||||
hideKeyboard(SepiaSearchActivity.this);
|
hideKeyboard(SepiaSearchActivity.this);
|
||||||
|
sepiaSearchVideo.setStart("0");
|
||||||
if( sepia_element_one_of_tags.getTags().size() > 0 ) {
|
if( sepia_element_one_of_tags.getTags().size() > 0 ) {
|
||||||
sepiaSearchVideo.setTagsOneOf(sepia_element_one_of_tags.getTags());
|
sepiaSearchVideo.setTagsOneOf(sepia_element_one_of_tags.getTags());
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -59,7 +59,6 @@ public class DisplaySepiaSearchFragment extends Fragment implements AccountsHori
|
||||||
private boolean flag_loading;
|
private boolean flag_loading;
|
||||||
private Context context;
|
private Context context;
|
||||||
private PeertubeAdapter peertubeAdapater;
|
private PeertubeAdapter peertubeAdapater;
|
||||||
private String max_id;
|
|
||||||
private List<VideoData.Video> peertubes;
|
private List<VideoData.Video> peertubes;
|
||||||
private RelativeLayout mainLoader, nextElementLoader, textviewNoAction;
|
private RelativeLayout mainLoader, nextElementLoader, textviewNoAction;
|
||||||
private boolean firstLoad;
|
private boolean firstLoad;
|
||||||
|
@ -86,7 +85,6 @@ public class DisplaySepiaSearchFragment extends Fragment implements AccountsHori
|
||||||
if (bundle != null) {
|
if (bundle != null) {
|
||||||
sepiaSearchVideo = bundle.getParcelable("sepiaSearchVideo");
|
sepiaSearchVideo = bundle.getParcelable("sepiaSearchVideo");
|
||||||
}
|
}
|
||||||
max_id = "0";
|
|
||||||
lv_status = rootView.findViewById(R.id.lv_status);
|
lv_status = rootView.findViewById(R.id.lv_status);
|
||||||
flag_loading = true;
|
flag_loading = true;
|
||||||
firstLoad = true;
|
firstLoad = true;
|
||||||
|
@ -215,10 +213,8 @@ public class DisplaySepiaSearchFragment extends Fragment implements AccountsHori
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int previousPosition = this.peertubes.size();
|
int previousPosition = this.peertubes.size();
|
||||||
if (max_id == null)
|
|
||||||
max_id = "0";
|
|
||||||
int videoPerPage = sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE);
|
int videoPerPage = sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE);
|
||||||
max_id = String.valueOf(Integer.parseInt(max_id) + videoPerPage);
|
sepiaSearchVideo.setStart(String.valueOf(Integer.parseInt(sepiaSearchVideo.getStart())+ videoPerPage));
|
||||||
this.peertubes.addAll(videoData.data);
|
this.peertubes.addAll(videoData.data);
|
||||||
//If no item were inserted previously the adapter is created
|
//If no item were inserted previously the adapter is created
|
||||||
if (previousPosition == 0) {
|
if (previousPosition == 0) {
|
||||||
|
|
Loading…
Reference in New Issue