Remove unnecessary cast.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
This commit is contained in:
parent
1cdf76db8b
commit
365bd96f56
|
@ -21,7 +21,7 @@ import org.moire.ultrasonic.service.SubsonicRESTException
|
|||
fun SubsonicRESTException.getLocalizedErrorMessage(context: Context): String =
|
||||
when (error) {
|
||||
is Generic -> {
|
||||
val message = (error as Generic).message
|
||||
val message = error.message
|
||||
val errorMessage = if (message == "") {
|
||||
context.getString(R.string.api_subsonic_generic_no_message)
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue