Skip to content

Commit

Permalink
fixes #592
Browse files Browse the repository at this point in the history
  • Loading branch information
raamcosta committed Mar 5, 2024
1 parent 274755c commit c33e923
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.ramcosta.composedestinations.navargs.primitives.arraylist

import android.os.Bundle
import androidx.lifecycle.SavedStateHandle
import androidx.navigation.NavBackStackEntry
import com.ramcosta.composedestinations.navargs.DestinationsNavType
import com.ramcosta.composedestinations.navargs.primitives.DECODED_NULL
import com.ramcosta.composedestinations.navargs.primitives.ENCODED_NULL
Expand Down Expand Up @@ -38,7 +37,7 @@ class DestinationsEnumArrayListNavType<E : Enum<*>>(

override fun serializeValue(value: ArrayList<E>?): String {
if (value == null) return ENCODED_NULL
return value.joinToString(",") { it.name }
return "[${value.joinToString(",") { it.name }}]"
}

override fun get(savedStateHandle: SavedStateHandle, key: String): ArrayList<E>? {
Expand Down

0 comments on commit c33e923

Please sign in to comment.