https://kotlinlang.org logo
p

pawel.barszcz

01/08/2017, 9:48 PM
This is my current workaround, but I hope there is something nicer 🙂
Copy code
override fun save(updatedProject: Project): Project {
        // TODO we cannot just do += because it will not replace old element with a new one if it already exist
        projects = (projects - updatedProject) + updatedProject
        return updatedProject
    }