1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-22 01:55:22 +01:00
This commit is contained in:
Isira Seneviratne 2024-11-21 06:56:10 +05:30
parent 3a9540b042
commit 9f4a33c7a8

View File

@ -195,7 +195,9 @@ open class App :
fun reportException(throwable: Throwable) {
// Throw uncaught exception that will trigger the report system
Thread.currentThread().uncaughtExceptionHandler
Thread
.currentThread()
.uncaughtExceptionHandler
.uncaughtException(Thread.currentThread(), throwable)
}
},
@ -220,39 +222,44 @@ open class App :
private fun initNotificationChannels() {
// Keep the importance below DEFAULT to avoid making noise on every notification update for
// the main and update channels
val mainChannel = NotificationChannelCompat.Builder(
val mainChannel =
NotificationChannelCompat
.Builder(
getString(R.string.notification_channel_id),
NotificationManagerCompat.IMPORTANCE_LOW,
)
.setName(getString(R.string.notification_channel_name))
).setName(getString(R.string.notification_channel_name))
.setDescription(getString(R.string.notification_channel_description))
.build()
val appUpdateChannel = NotificationChannelCompat.Builder(
val appUpdateChannel =
NotificationChannelCompat
.Builder(
getString(R.string.app_update_notification_channel_id),
NotificationManagerCompat.IMPORTANCE_LOW,
)
.setName(getString(R.string.app_update_notification_channel_name))
).setName(getString(R.string.app_update_notification_channel_name))
.setDescription(getString(R.string.app_update_notification_channel_description))
.build()
val hashChannel = NotificationChannelCompat.Builder(
val hashChannel =
NotificationChannelCompat
.Builder(
getString(R.string.hash_channel_id),
NotificationManagerCompat.IMPORTANCE_HIGH,
)
.setName(getString(R.string.hash_channel_name))
).setName(getString(R.string.hash_channel_name))
.setDescription(getString(R.string.hash_channel_description))
.build()
val errorReportChannel = NotificationChannelCompat.Builder(
val errorReportChannel =
NotificationChannelCompat
.Builder(
getString(R.string.error_report_channel_id),
NotificationManagerCompat.IMPORTANCE_LOW,
)
.setName(getString(R.string.error_report_channel_name))
).setName(getString(R.string.error_report_channel_name))
.setDescription(getString(R.string.error_report_channel_description))
.build()
val newStreamChannel = NotificationChannelCompat.Builder(
val newStreamChannel =
NotificationChannelCompat
.Builder(
getString(R.string.streams_notification_channel_id),
NotificationManagerCompat.IMPORTANCE_DEFAULT,
)
.setName(getString(R.string.streams_notification_channel_name))
).setName(getString(R.string.streams_notification_channel_name))
.setDescription(getString(R.string.streams_notification_channel_description))
.build()