mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 16:40:32 +00:00
Move checking for new version to MainAcitvity
When the service is started from the Application class, the app might be still in the background. This is definetly not the case when MainActivity.onCreate() is called. Fixes #7227
This commit is contained in:
parent
e0ba9b3902
commit
54d3bff26d
@ -43,8 +43,6 @@ import io.reactivex.rxjava3.exceptions.UndeliverableException;
|
|||||||
import io.reactivex.rxjava3.functions.Consumer;
|
import io.reactivex.rxjava3.functions.Consumer;
|
||||||
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
|
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
|
||||||
|
|
||||||
import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
|
* Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
|
||||||
* App.java is part of NewPipe.
|
* App.java is part of NewPipe.
|
||||||
@ -113,9 +111,6 @@ public class App extends MultiDexApplication {
|
|||||||
&& prefs.getBoolean(getString(R.string.show_image_indicators_key), false));
|
&& prefs.getBoolean(getString(R.string.show_image_indicators_key), false));
|
||||||
|
|
||||||
configureRxJavaErrorHandler();
|
configureRxJavaErrorHandler();
|
||||||
|
|
||||||
// Check for new version
|
|
||||||
startNewVersionCheckService();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
package org.schabi.newpipe;
|
package org.schabi.newpipe;
|
||||||
|
|
||||||
|
import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService;
|
||||||
|
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -163,6 +165,9 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
FocusOverlayView.setupFocusObserver(this);
|
FocusOverlayView.setupFocusObserver(this);
|
||||||
}
|
}
|
||||||
openMiniPlayerUponPlayerStarted();
|
openMiniPlayerUponPlayerStarted();
|
||||||
|
|
||||||
|
// Check for new version
|
||||||
|
startNewVersionCheckService();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupDrawer() throws Exception {
|
private void setupDrawer() throws Exception {
|
||||||
|
Loading…
Reference in New Issue
Block a user