mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2025-10-04 18:29:26 +02:00
Reduce power consumption
Only schedule the chek for new streams if the user enaled the check. Cancel the worker when the user disables the notifications.
This commit is contained in:
parent
779d3dce6f
commit
19fd7bc37e
4 changed files with 60 additions and 13 deletions
|
@ -165,8 +165,9 @@ public class MainActivity extends AppCompatActivity {
|
|||
}
|
||||
openMiniPlayerUponPlayerStarted();
|
||||
|
||||
// schedule worker for checking for new streams and creating corresponding notifications
|
||||
NotificationWorker.schedule(this);
|
||||
// Schedule worker for checking for new streams and creating corresponding notifications
|
||||
// if this is enabled by the user.
|
||||
NotificationWorker.initialize(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue