even more fixes
This commit is contained in:
parent
4edd72f627
commit
4a387ea0cf
4 changed files with 15 additions and 11 deletions
|
|
@ -111,6 +111,7 @@ public class HomeRecyclerViewAdapter extends RecyclerView.Adapter<HomeRecyclerVi
|
|||
if (video.isDownloading()){
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
progressBar.setProgress(0);
|
||||
progressBar.setIndeterminate(true);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -680,7 +680,6 @@ public class DownloadsFragment extends Fragment implements DownloadsRecyclerView
|
|||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setDataAndType(uri, mime);
|
||||
i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
if(bottomSheet != null) bottomSheet.hide();
|
||||
startActivity(i);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
|
||||
public void scrollToTop() {
|
||||
recyclerView.scrollToPosition(0);
|
||||
new Handler(Looper.getMainLooper()).post(() -> ((AppBarLayout) topAppBar.getParent()).setExpanded(true, true));
|
||||
((AppBarLayout) topAppBar.getParent()).setExpanded(true, true);
|
||||
}
|
||||
|
||||
private void parseQuery(boolean resetResults) {
|
||||
|
|
@ -523,7 +523,7 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
resultObjects.addAll(tmp_vids);
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
dbManager.addToResults(tmp_vids);
|
||||
homeRecyclerViewAdapter.setVideoList(tmp_vids, false);
|
||||
homeRecyclerViewAdapter.setVideoList(resultObjects, true);
|
||||
shimmerCards.stopShimmer();
|
||||
shimmerCards.setVisibility(View.GONE);
|
||||
});
|
||||
|
|
@ -855,6 +855,8 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
return;
|
||||
}
|
||||
bottomSheet.cancel();
|
||||
start--;
|
||||
end--;
|
||||
if (start <= 1) start = 0;
|
||||
|
||||
SharedPreferences sharedPreferences = context.getSharedPreferences("root_preferences", Activity.MODE_PRIVATE);
|
||||
|
|
@ -882,8 +884,9 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
|
||||
TextInputLayout audioFormat = downloadTypeBottomSheet.findViewById(R.id.audio_format);
|
||||
int finalStart = start;
|
||||
int finalEnd = end;
|
||||
((AutoCompleteTextView)audioFormat.getEditText()).setOnItemClickListener((adapterView, view, index, l) -> {
|
||||
for (int i = finalStart; i < end; i++){
|
||||
for (int i = finalStart; i <= finalEnd; i++){
|
||||
Video vid = findVideo(resultObjects.get(i).getURL());
|
||||
vid.setAudioFormat(audioFormats[index]);
|
||||
}
|
||||
|
|
@ -904,8 +907,9 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
|
||||
TextInputLayout videoFormat = downloadTypeBottomSheet.findViewById(R.id.video_format);
|
||||
int finalStart1 = start;
|
||||
int finalEnd1 = end;
|
||||
((AutoCompleteTextView)videoFormat.getEditText()).setOnItemClickListener((adapterView, view, index, l) -> {
|
||||
for (int i = finalStart1; i < end; i++){
|
||||
for (int i = finalStart1; i <= finalEnd1; i++){
|
||||
Video vid = findVideo(resultObjects.get(i).getURL());
|
||||
vid.setVideoFormat(videoFormats[index]);
|
||||
}
|
||||
|
|
@ -915,7 +919,7 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
|
||||
TextInputLayout videoQuality = downloadTypeBottomSheet.findViewById(R.id.video_quality);
|
||||
((AutoCompleteTextView)videoQuality.getEditText()).setOnItemClickListener((adapterView, view, index, l) -> {
|
||||
for (int i = finalStart1; i < end; i++){
|
||||
for (int i = finalStart1; i <= finalEnd1; i++){
|
||||
Video vid = findVideo(resultObjects.get(i).getURL());
|
||||
vid.setVideoQuality(videoQualities[index]);
|
||||
}
|
||||
|
|
@ -964,8 +968,9 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
|
||||
Button download = downloadTypeBottomSheet.findViewById(R.id.bottomsheet_download_button);
|
||||
int finalStart2 = start;
|
||||
int finalEnd2 = end;
|
||||
download.setOnClickListener(view -> {
|
||||
for (int i = finalStart2; i < end; i++){
|
||||
for (int i = finalStart2; i <= finalEnd2; i++){
|
||||
Video vid = findVideo(resultObjects.get(i).getURL());
|
||||
vid.setDownloadedType(type);
|
||||
updateDownloadingStatusOnResult(vid, type, true);
|
||||
|
|
@ -982,7 +987,7 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
downloadTypeBottomSheet.show();
|
||||
downloadTypeBottomSheet.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
}else{
|
||||
for (int i = start; i < end; i++){
|
||||
for (int i = start; i <= end; i++){
|
||||
Video vid = findVideo(resultObjects.get(i).getURL());
|
||||
vid.setDownloadedType(type);
|
||||
updateDownloadingStatusOnResult(vid, type, true);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<external-path
|
||||
name="external_files"
|
||||
path="." />
|
||||
<external-path name="external_files" path="."/>
|
||||
<root-path name="external_files" path="/storage/" />
|
||||
<cache-path
|
||||
name="cache"
|
||||
path="." />
|
||||
|
|
|
|||
Loading…
Reference in a new issue