From 370708349cd1151e0a27ae3613aae97656c154e5 Mon Sep 17 00:00:00 2001 From: warrior Date: Sun, 8 Aug 2021 15:22:56 +0200 Subject: [PATCH] Fix formatting --- .../kotlin/com/github/warriorzz/ktify/model/Playlist.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/github/warriorzz/ktify/model/Playlist.kt b/src/main/kotlin/com/github/warriorzz/ktify/model/Playlist.kt index a7f61f2..a69ee65 100755 --- a/src/main/kotlin/com/github/warriorzz/ktify/model/Playlist.kt +++ b/src/main/kotlin/com/github/warriorzz/ktify/model/Playlist.kt @@ -54,17 +54,16 @@ sealed class PlaylistTrackObject { * Get the instance as a PlaylistTrack object * @return Null if the instance is an PlaylistTrackRef */ - fun asPlaylistTrack() : PlaylistTrack? = if (this is PlaylistTrack) this else null + fun asPlaylistTrack(): PlaylistTrack? = if (this is PlaylistTrack) this else null /** * Get the instance as a PlaylistTrackRef object * @return Null if the instance is an PlaylistTrack */ - fun asPlaylistTrackRef() : PlaylistTrackRef? = if (this is PlaylistTrackRef) this else null - + fun asPlaylistTrackRef(): PlaylistTrackRef? = if (this is PlaylistTrackRef) this else null } -object PlaylistTrackObjectSerializer: JsonContentPolymorphicSerializer(PlaylistTrackObject::class) { +object PlaylistTrackObjectSerializer : JsonContentPolymorphicSerializer(PlaylistTrackObject::class) { override fun selectDeserializer(element: JsonElement): DeserializationStrategy { return if (element.jsonObject["track"] != null) PlaylistTrack.serializer() else PlaylistTrackRef.serializer() }