Skip to content

Commit

Permalink
properly handle notification on error
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Mar 16, 2024
1 parent 2b1bfb5 commit fb33222
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ class EphemeralWorker (private var mContext: Context, workerParams: WorkerParame
mNotificationManager?.setCancelId(id)
if(preconditionsMet()) {
handleSync(mTitle)
postSync()
} else {
log("Preconditions are not met!")
postSync()
return Result.failure()
}

postSync()
// Indicate whether the work finished successfully with the Result
return Result.success()
}
Expand Down

0 comments on commit fb33222

Please sign in to comment.