Skip to content

Commit 9f4a33c

Browse files
Fix lint
1 parent 3a9540b commit 9f4a33c

1 file changed

Lines changed: 43 additions & 36 deletions

File tree

  • app/src/main/java/org/schabi/newpipe

app/src/main/java/org/schabi/newpipe/App.kt

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ open class App :
195195

196196
fun reportException(throwable: Throwable) {
197197
// Throw uncaught exception that will trigger the report system
198-
Thread.currentThread().uncaughtExceptionHandler
198+
Thread
199+
.currentThread()
200+
.uncaughtExceptionHandler
199201
.uncaughtException(Thread.currentThread(), throwable)
200202
}
201203
},
@@ -220,41 +222,46 @@ open class App :
220222
private fun initNotificationChannels() {
221223
// Keep the importance below DEFAULT to avoid making noise on every notification update for
222224
// the main and update channels
223-
val mainChannel = NotificationChannelCompat.Builder(
224-
getString(R.string.notification_channel_id),
225-
NotificationManagerCompat.IMPORTANCE_LOW,
226-
)
227-
.setName(getString(R.string.notification_channel_name))
228-
.setDescription(getString(R.string.notification_channel_description))
229-
.build()
230-
val appUpdateChannel = NotificationChannelCompat.Builder(
231-
getString(R.string.app_update_notification_channel_id),
232-
NotificationManagerCompat.IMPORTANCE_LOW,
233-
)
234-
.setName(getString(R.string.app_update_notification_channel_name))
235-
.setDescription(getString(R.string.app_update_notification_channel_description))
236-
.build()
237-
val hashChannel = NotificationChannelCompat.Builder(
238-
getString(R.string.hash_channel_id),
239-
NotificationManagerCompat.IMPORTANCE_HIGH,
240-
)
241-
.setName(getString(R.string.hash_channel_name))
242-
.setDescription(getString(R.string.hash_channel_description))
243-
.build()
244-
val errorReportChannel = NotificationChannelCompat.Builder(
245-
getString(R.string.error_report_channel_id),
246-
NotificationManagerCompat.IMPORTANCE_LOW,
247-
)
248-
.setName(getString(R.string.error_report_channel_name))
249-
.setDescription(getString(R.string.error_report_channel_description))
250-
.build()
251-
val newStreamChannel = NotificationChannelCompat.Builder(
252-
getString(R.string.streams_notification_channel_id),
253-
NotificationManagerCompat.IMPORTANCE_DEFAULT,
254-
)
255-
.setName(getString(R.string.streams_notification_channel_name))
256-
.setDescription(getString(R.string.streams_notification_channel_description))
257-
.build()
225+
val mainChannel =
226+
NotificationChannelCompat
227+
.Builder(
228+
getString(R.string.notification_channel_id),
229+
NotificationManagerCompat.IMPORTANCE_LOW,
230+
).setName(getString(R.string.notification_channel_name))
231+
.setDescription(getString(R.string.notification_channel_description))
232+
.build()
233+
val appUpdateChannel =
234+
NotificationChannelCompat
235+
.Builder(
236+
getString(R.string.app_update_notification_channel_id),
237+
NotificationManagerCompat.IMPORTANCE_LOW,
238+
).setName(getString(R.string.app_update_notification_channel_name))
239+
.setDescription(getString(R.string.app_update_notification_channel_description))
240+
.build()
241+
val hashChannel =
242+
NotificationChannelCompat
243+
.Builder(
244+
getString(R.string.hash_channel_id),
245+
NotificationManagerCompat.IMPORTANCE_HIGH,
246+
).setName(getString(R.string.hash_channel_name))
247+
.setDescription(getString(R.string.hash_channel_description))
248+
.build()
249+
val errorReportChannel =
250+
NotificationChannelCompat
251+
.Builder(
252+
getString(R.string.error_report_channel_id),
253+
NotificationManagerCompat.IMPORTANCE_LOW,
254+
).setName(getString(R.string.error_report_channel_name))
255+
.setDescription(getString(R.string.error_report_channel_description))
256+
.build()
257+
val newStreamChannel =
258+
NotificationChannelCompat
259+
.Builder(
260+
getString(R.string.streams_notification_channel_id),
261+
NotificationManagerCompat.IMPORTANCE_DEFAULT,
262+
).setName(getString(R.string.streams_notification_channel_name))
263+
.setDescription(getString(R.string.streams_notification_channel_description))
264+
.build()
258265

259266
val channels = listOf(mainChannel, appUpdateChannel, hashChannel, errorReportChannel, newStreamChannel)
260267

0 commit comments

Comments
 (0)