mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-14 08:27:15 +03:00
Add logging for potential NPE
This commit is contained in:
parent
46ad240306
commit
be55eb514c
@ -31,5 +31,4 @@ if (isCodeQualityEnabled) {
|
||||
}
|
||||
tasks.detekt.jvmTarget = "11"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -600,14 +600,17 @@ open class TrackCollectionFragment(
|
||||
listModel.getRandom(size, append)
|
||||
} else {
|
||||
setTitle(name)
|
||||
requireNotNull(id) {
|
||||
"ID must be set. NavArgs: ${navArgs.toBundle()}"
|
||||
}
|
||||
if (ActiveServerProvider.isID3Enabled()) {
|
||||
if (isAlbum) {
|
||||
listModel.getAlbum(refresh2, id!!, name)
|
||||
listModel.getAlbum(refresh2, id, name)
|
||||
} else {
|
||||
throw IllegalAccessException("Use AlbumFragment instead!")
|
||||
}
|
||||
} else {
|
||||
listModel.getMusicDirectory(refresh2, id!!, name)
|
||||
listModel.getMusicDirectory(refresh2, id, name)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,14 +39,14 @@ object CommunicationError {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun handleError(error: Throwable?, context: Context?) {
|
||||
fun handleError(error: Throwable, context: Context?) {
|
||||
Timber.w(error)
|
||||
|
||||
if (context == null) return
|
||||
|
||||
ErrorDialog(
|
||||
context = context,
|
||||
message = getErrorMessage(error!!, context)
|
||||
message = getErrorMessage(error, context)
|
||||
).show()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user