Skip to content

Commit e1cc84a

Browse files
authored
Merge pull request #3113 from TeamNewPipe/dev
Release v0.18.4
2 parents 0df8140 + 533aede commit e1cc84a

121 files changed

Lines changed: 2776 additions & 2574 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</p>
1414
<hr>
1515
<p align="center"><a href="#screenshots">Screenshots</a> &bull; <a href="#description">Description</a> &bull; <a href="#features">Features</a> &bull; <a href="#updates">Updates</a> &bull; <a href="#contribution">Contribution</a> &bull; <a href="#donate">Donate</a> &bull; <a href="#license">License</a></p>
16-
<p align="center"><a href="https://newpipe.schabi.org">Website</a> &bull; <a href="https://newpipe.schabi.org/blog/">Blog</a> &bull; <a href="https://newpipe.schabi.org/press/">Press</a></p>
16+
<p align="center"><a href="https://newpipe.schabi.org">Website</a> &bull; <a href="https://newpipe.schabi.org/blog/">Blog</a> &bull; <a href="https://newpipe.schabi.org/FAQ/">FAQ</a> &bull; <a href="https://newpipe.schabi.org/press/">Press</a></p>
1717
<hr>
1818

1919
<b>WARNING: THIS IS A BETA VERSION, THEREFORE YOU MAY ENCOUNTER BUGS. IF YOU DO, OPEN AN ISSUE VIA OUR GITHUB REPOSITORY.</b>

app/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.gitignore
22
/build
3-
app.iml
3+
*.iml

app/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
applicationId "org.schabi.newpipe"
1212
minSdkVersion 19
1313
targetSdkVersion 28
14-
versionCode 830
15-
versionName "0.18.3"
14+
versionCode 840
15+
versionName "0.18.4"
1616

1717
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1818
vectorDrawables.useSupportLibrary = true
@@ -53,6 +53,7 @@ ext {
5353
okHttpLibVersion = '3.12.6'
5454
icepickLibVersion = '3.2.0'
5555
stethoLibVersion = '1.5.0'
56+
markwonVersion = '4.2.1'
5657
}
5758

5859
dependencies {
@@ -62,7 +63,7 @@ dependencies {
6263
exclude module: 'support-annotations'
6364
})
6465

65-
implementation 'com.github.TeamNewPipe:NewPipeExtractor:33961b20'
66+
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.18.4'
6667
testImplementation 'junit:junit:4.12'
6768
testImplementation 'org.mockito:mockito-core:2.23.0'
6869

@@ -94,7 +95,7 @@ dependencies {
9495
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
9596
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
9697
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
97-
implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
98+
implementation 'org.ocpsoft.prettytime:prettytime:4.0.3.Final'
9899

99100
implementation "androidx.room:room-runtime:${roomDbLibVersion}"
100101
implementation "androidx.room:room-rxjava2:${roomDbLibVersion}"
@@ -108,4 +109,7 @@ dependencies {
108109

109110
implementation "com.squareup.okhttp3:okhttp:${okHttpLibVersion}"
110111
debugImplementation "com.facebook.stetho:stetho-okhttp3:${stethoLibVersion}"
112+
113+
implementation "io.noties.markwon:core:${markwonVersion}"
114+
implementation "io.noties.markwon:linkify:${markwonVersion}"
111115
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112

113113
<activity
114114
android:name=".ReCaptchaActivity"
115-
android:label="@string/reCaptchaActivity"/>
115+
android:label="@string/recaptcha"/>
116116

117117
<provider
118118
android:name="androidx.core.content.FileProvider"

app/src/main/java/org/schabi/newpipe/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void onCreate() {
9999
NewPipe.init(getDownloader(),
100100
Localization.getPreferredLocalization(this),
101101
Localization.getPreferredContentCountry(this));
102-
Localization.init();
102+
Localization.init(getApplicationContext());
103103

104104
StateSaver.init(this);
105105
initNotificationChannel();

app/src/main/java/org/schabi/newpipe/MainActivity.java

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import android.util.Log;
3232
import android.view.LayoutInflater;
3333
import android.view.Menu;
34-
import android.view.MenuInflater;
3534
import android.view.MenuItem;
3635
import android.view.View;
3736
import android.view.Window;
@@ -56,7 +55,6 @@
5655
import com.google.android.material.navigation.NavigationView;
5756

5857
import org.schabi.newpipe.extractor.NewPipe;
59-
import org.schabi.newpipe.extractor.ServiceList;
6058
import org.schabi.newpipe.extractor.StreamingService;
6159
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
6260
import org.schabi.newpipe.extractor.services.peertube.PeertubeInstance;
@@ -67,6 +65,7 @@
6765
import org.schabi.newpipe.report.ErrorActivity;
6866
import org.schabi.newpipe.util.Constants;
6967
import org.schabi.newpipe.util.KioskTranslator;
68+
import org.schabi.newpipe.util.Localization;
7069
import org.schabi.newpipe.util.NavigationHelper;
7170
import org.schabi.newpipe.util.PeertubeHelper;
7271
import org.schabi.newpipe.util.PermissionHelper;
@@ -78,6 +77,8 @@
7877
import java.util.ArrayList;
7978
import java.util.List;
8079

80+
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
81+
8182
public class MainActivity extends AppCompatActivity {
8283
private static final String TAG = "MainActivity";
8384
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
@@ -113,9 +114,9 @@ protected void onCreate(Bundle savedInstanceState) {
113114
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
114115
TLSSocketFactoryCompat.setAsDefault();
115116
}
116-
117117
ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this));
118118

119+
assureCorrectAppLanguage(this);
119120
super.onCreate(savedInstanceState);
120121
setContentView(R.layout.activity_main);
121122

@@ -419,6 +420,8 @@ protected void onDestroy() {
419420

420421
@Override
421422
protected void onResume() {
423+
assureCorrectAppLanguage(this);
424+
Localization.init(getApplicationContext()); //change the date format to match the selected language on resume
422425
super.onResume();
423426

424427
// close drawer on return, and don't show animation, so its looks like the drawer isn't open
@@ -449,6 +452,16 @@ protected void onResume() {
449452
sharedPreferences.edit().putBoolean(Constants.KEY_MAIN_PAGE_CHANGE, false).apply();
450453
NavigationHelper.openMainActivity(this);
451454
}
455+
456+
if (sharedPreferences.getBoolean(Constants.KEY_ENABLE_WATCH_HISTORY, true)) {
457+
if (DEBUG) Log.d(TAG, "do not show History-menu as its disabled in settings");
458+
drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(true);
459+
}
460+
461+
if (!sharedPreferences.getBoolean(Constants.KEY_ENABLE_WATCH_HISTORY, true)) {
462+
if (DEBUG) Log.d(TAG, "show History-menu as its enabled in settings");
463+
drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(false);
464+
}
452465
}
453466

454467
@Override
@@ -551,8 +564,6 @@ public boolean onCreateOptionsMenu(Menu menu) {
551564
if (!(fragment instanceof SearchFragment)) {
552565
findViewById(R.id.toolbar).findViewById(R.id.toolbar_search_container).setVisibility(View.GONE);
553566

554-
MenuInflater inflater = getMenuInflater();
555-
inflater.inflate(R.menu.main_menu, menu);
556567
}
557568

558569
ActionBar actionBar = getSupportActionBar();
@@ -574,14 +585,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
574585
case android.R.id.home:
575586
onHomeButtonPressed();
576587
return true;
577-
case R.id.action_show_downloads:
578-
return NavigationHelper.openDownloads(this);
579-
case R.id.action_history:
580-
NavigationHelper.openStatisticFragment(getSupportFragmentManager());
581-
return true;
582-
case R.id.action_settings:
583-
NavigationHelper.openSettings(this);
584-
return true;
585588
default:
586589
return super.onOptionsItemSelected(item);
587590
}

0 commit comments

Comments
 (0)