Merge pull request #3745 from Isira-Seneviratne/Skip_stream_check

Properly skip the new stream check.
This commit is contained in:
Isira Seneviratne 2023-05-10 17:48:45 +05:30 committed by GitHub
commit 71147daa1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ class NotificationWorker(appContext: Context, parameters: WorkerParameters) :
private val notificationManager = appContext.getSystemService<NotificationManager>()!! private val notificationManager = appContext.getSystemService<NotificationManager>()!!
override suspend fun doWork(): Result { override suspend fun doWork(): Result {
if (!checkTime()) Result.success() if (!checkTime()) return Result.success()
// check whether there are new streams and notify if there are some // check whether there are new streams and notify if there are some
val result = checkForNewStreams() val result = checkForNewStreams()
// return success if the API request succeeded // return success if the API request succeeded