misc fixes

* use getPreferredLocalization() instead of getLocalization()
* use lastest commit in build.gradle
* fix missing cast in MissionAdapter.java
This commit is contained in:
kapodamy 2018-11-15 22:30:00 -03:00
parent 6784522195
commit fef9d541ed
3 changed files with 4 additions and 3 deletions

View File

@ -54,7 +54,7 @@ dependencies {
exclude module: 'support-annotations' exclude module: 'support-annotations'
}) })
implementation 'com.github.TeamNewPipe:NewPipeExtractor:32d316330c26' implementation 'com.github.TeamNewPipe:NewPipeExtractor:91b1efc97e'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0' testImplementation 'org.mockito:mockito-core:2.23.0'

View File

@ -376,7 +376,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
} }
private int getSubtitleIndexBy(List<SubtitlesStream> streams) { private int getSubtitleIndexBy(List<SubtitlesStream> streams) {
Localization loc = NewPipe.getLocalization(); Localization loc = NewPipe.getPreferredLocalization();
for (int j = 0; j < 2; j++) { for (int j = 0; j < 2; j++) {
for (int i = 0; i < streams.size(); i++) { for (int i = 0; i < streams.size(); i++) {
Locale streamLocale = streams.get(i).getLocale(); Locale streamLocale = streams.get(i).getLocale();

View File

@ -577,7 +577,8 @@ public class MissionAdapter extends RecyclerView.Adapter<ViewHolder> {
checksum = menu.findItem(R.id.checksum); checksum = menu.findItem(R.id.checksum);
itemView.setOnClickListener((v) -> { itemView.setOnClickListener((v) -> {
if(h.mission.finished) viewWithFileProvider(h); if(((DownloadMission)item.mission).isFinished())
viewWithFileProvider(item.mission.getDownloadedFile());
}); });
//h.itemView.setOnClickListener(v -> showDetail(h)); //h.itemView.setOnClickListener(v -> showDetail(h));