Skip to content

Commit

Permalink
Apply ktlint formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Isira-Seneviratne authored and Stypox committed Dec 4, 2022
1 parent 82ccbeb commit e2670ac
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions app/src/main/java/org/schabi/newpipe/NewVersionWorker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ class NewVersionWorker(
if (inputData.getBoolean(IS_MANUAL, false)) {
// Show toast stating that the app is up-to-date if the update check was manual.
ContextCompat.getMainExecutor(applicationContext).execute {
Toast.makeText(applicationContext, R.string.app_update_unavailable_toast,
Toast.LENGTH_SHORT).show()
Toast.makeText(
applicationContext, R.string.app_update_unavailable_toast,
Toast.LENGTH_SHORT
).show()
}
}
return
Expand All @@ -66,10 +68,14 @@ class NewVersionWorker(
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setAutoCancel(true)
.setContentIntent(pendingIntent)
.setContentTitle(applicationContext.getString(
R.string.app_update_available_notification_title))
.setContentText(applicationContext.getString(
R.string.app_update_available_notification_text, versionName))
.setContentTitle(
applicationContext.getString(R.string.app_update_available_notification_title)
)
.setContentText(
applicationContext.getString(
R.string.app_update_available_notification_text, versionName
)
)

val notificationManager = NotificationManagerCompat.from(applicationContext)
notificationManager.notify(2000, notificationBuilder.build())
Expand Down

0 comments on commit e2670ac

Please sign in to comment.