Remove unnecessary cast.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
This commit is contained in:
Yahor Berdnikau 2018-01-20 12:53:26 +01:00
parent 1cdf76db8b
commit 365bd96f56
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ import org.moire.ultrasonic.service.SubsonicRESTException
fun SubsonicRESTException.getLocalizedErrorMessage(context: Context): String = fun SubsonicRESTException.getLocalizedErrorMessage(context: Context): String =
when (error) { when (error) {
is Generic -> { is Generic -> {
val message = (error as Generic).message val message = error.message
val errorMessage = if (message == "") { val errorMessage = if (message == "") {
context.getString(R.string.api_subsonic_generic_no_message) context.getString(R.string.api_subsonic_generic_no_message)
} else { } else {