mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
fix linter
This commit is contained in:
parent
a168bb2d1f
commit
b867df053b
@ -68,24 +68,35 @@ class LibreTubeApp : Application() {
|
|||||||
* Initializes the required notification channels for the app.
|
* Initializes the required notification channels for the app.
|
||||||
*/
|
*/
|
||||||
private fun initializeNotificationChannels() {
|
private fun initializeNotificationChannels() {
|
||||||
val downloadChannel = NotificationChannelCompat.Builder(DOWNLOAD_CHANNEL_ID,
|
val downloadChannel = NotificationChannelCompat.Builder(
|
||||||
NotificationManagerCompat.IMPORTANCE_NONE)
|
DOWNLOAD_CHANNEL_ID,
|
||||||
|
NotificationManagerCompat.IMPORTANCE_NONE
|
||||||
|
)
|
||||||
.setName(getString(R.string.download_channel_name))
|
.setName(getString(R.string.download_channel_name))
|
||||||
.setDescription(getString(R.string.download_channel_description))
|
.setDescription(getString(R.string.download_channel_description))
|
||||||
.build()
|
.build()
|
||||||
val backgroundChannel = NotificationChannelCompat.Builder(BACKGROUND_CHANNEL_ID,
|
val backgroundChannel = NotificationChannelCompat.Builder(
|
||||||
NotificationManagerCompat.IMPORTANCE_LOW)
|
BACKGROUND_CHANNEL_ID,
|
||||||
|
NotificationManagerCompat.IMPORTANCE_LOW
|
||||||
|
)
|
||||||
.setName(getString(R.string.background_channel_name))
|
.setName(getString(R.string.background_channel_name))
|
||||||
.setDescription(getString(R.string.background_channel_description))
|
.setDescription(getString(R.string.background_channel_description))
|
||||||
.build()
|
.build()
|
||||||
val pushChannel = NotificationChannelCompat.Builder(PUSH_CHANNEL_ID,
|
val pushChannel = NotificationChannelCompat.Builder(
|
||||||
NotificationManagerCompat.IMPORTANCE_DEFAULT)
|
PUSH_CHANNEL_ID,
|
||||||
|
NotificationManagerCompat.IMPORTANCE_DEFAULT
|
||||||
|
)
|
||||||
.setName(getString(R.string.push_channel_name))
|
.setName(getString(R.string.push_channel_name))
|
||||||
.setDescription(getString(R.string.push_channel_description))
|
.setDescription(getString(R.string.push_channel_description))
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
val notificationManager = NotificationManagerCompat.from(this)
|
val notificationManager = NotificationManagerCompat.from(this)
|
||||||
notificationManager.createNotificationChannelsCompat(listOf(downloadChannel,
|
notificationManager.createNotificationChannelsCompat(
|
||||||
backgroundChannel, pushChannel))
|
listOf(
|
||||||
|
downloadChannel,
|
||||||
|
backgroundChannel,
|
||||||
|
pushChannel
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user