In the above code, is there any way to get around the "when expression must be exhaustive, add necessary else branch" error?
FeedItem is an abstract class which has only one inheritor currently. Do I need to add 'item.class' somehow to the when statement in order for the compiler to realise that there is only one option?