package Ġde . of 1 4 . dev . pro ver view for bitbucket . utils Ċ Ċ import Ġde . of 1 4 . dev . pro ver view for bitbucket . model . bitbucket . Pr Activities Paged Ċ import Ġde . of 1 4 . dev . pro ver view for bitbucket . model . bitbucket . User Ċ Ċ fun ĠList < Pr Activities Paged . Pr Activity Value >. flatten ed Comments (): ĠList < Pr Activities Paged . Pr Activity Value . Comment > Ġ{ ĊĠĠĠ Ġreturn Ġthis ĊĠĠĠĠĠĠĠ Ġ. map NotNull Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . comment ?. let Ġ{ Ġcomment Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġflat Comments Recursive ( comment ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ. flatten () Ċ } Ċ Ċ fun ĠPr Activities Paged . Pr Activity Value . Comment . flatten ed With Child Comments (): ĠList < Pr Activities Paged . Pr Activity Value . Comment > Ġ{ ĊĠĠĠ Ġreturn Ġflat Comments Recursive ( this ) Ċ } Ċ Ċ private Ġfun Ġflat Comments Recursive ( comment : ĠPr Activities Paged . Pr Activity Value . Comment ): ĠList < Pr Activities Paged . Pr Activity Value . Comment > Ġ{ ĊĠĠĠ Ġif Ġ( comment . comments . isEmpty ()) Ġreturn ĠlistOf ( comment ) ĊĠĠĠ Ġreturn ĠlistOf ( comment ) Ġ+ Ġcomment . comments Ġ+ Ġcomment . comments . flatMap Ġ{ Ġflat Comments Recursive ( it ) Ġ} Ċ } Ċ Ċ fun ĠUser . getFirst name (): ĠString Ġ{ ĊĠĠĠ Ġreturn ĠdisplayName . split (" Ġ"). first OrNull () Ġ?: ĠdisplayName Ċ } Ċ