INNER CODE UNIT · Java
start
SkyTubeTeam/SkyTube · app/src/main/java/free/rm/skytube/app/FeedUpdateTask.java:65
public synchronized boolean start(Context context) {
if (refreshInProgress) {
return false;
}
if (!SkyTubeApp.isConnected(context)) {
return false;
}
createNotificationChannel(context);
SkyTubeApp.getSettings().setRefreshSubsFeedFull(false);
refreshInProgress = true;
compositeDisposable.add(YouTubeTasks.refreshAllSubscriptions(context, this::processChannelIds,
newVideosFound -> {
numChannelsFetched++;
numVideosFetched += newVideosFound;
showNotification();
})
.observeOn(AndroidSchedulers.mainThread())