Properly skip the new stream check.

This commit is contained in:
Isira Seneviratne 2023-05-10 05:04:03 +05:30
parent 33ccb1aa0a
commit 2c24b26eb9

View File

@ -36,7 +36,7 @@ class NotificationWorker(appContext: Context, parameters: WorkerParameters) :
private val notificationManager = appContext.getSystemService<NotificationManager>()!!
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
val result = checkForNewStreams()
// return success if the API request succeeded