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