package Ġcom . say zen . camp fire sdk . screens . comments Ċ Ċ import Ġcom . google . android . material . floating action button . Floating ActionButton Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . d zen . camp fire . api . API _ TRANSL ATE Ċ import Ġcom . say zen . camp fire sdk . R Ċ import Ġcom . say zen . camp fire sdk . controllers . t Ċ import Ġcom . say zen . camp fire sdk . support . adapters . Adapter Comments Ċ import Ġcom . say zen . camp fire sdk . models . events . publications . Event Comments Count Changed Ċ import Ġcom . say zen . camp fire sdk . models . events . publications . Event Publication Remove Ċ import Ġcom . say zen . camp fire sdk . models . splash s . Splash Comment Ċ import Ġcom . sup . dev . android . libs . screens . Screen Ċ import Ġcom . sup . dev . android . libs . screens . navigator . Navigation Action Ċ import Ġcom . sup . dev . android . libs . screens . navigator . Navigator Ċ import Ġcom . sup . dev . java . libs . event Bus . EventBus Ċ import Ġcom . sup . dev . java . libs . event Bus . EventBus Subscriber Ċ Ċ class ĠS Comments Ġconstructor ( ĊĠĠĠĠĠĠĠ Ġval Ġpublication Id : ĠLong , ĊĠĠĠĠĠĠĠ Ġcomment Id : ĠLong Ċ ) Ġ: ĠScreen ( R . layout . screen _ comments ) Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠĠĠĠĠ Ġfun Ġinstance ( publication Id : ĠLong , Ġcomment Id : ĠLong , Ġaction : ĠNavigation Action ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠNavigator . action ( action , ĠS Comments ( publication Id , Ġcomment Id )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġevent Bus : ĠEvent Bus Subscriber Ġ= ĠEvent Bus ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe ( Event Publication Remove :: class ) Ġ{ Ġthis . on Event Publication Remove ( it ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe ( Event Comments Count Changed :: class ) Ġ{ Ġthis . on Event Comments Count Changed ( it ) Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġv Recycler : ĠRecyclerView Ġ= ĠfindViewById ( R . id . v Recycler ) ĊĠĠĠ Ġprivate Ġval Ġv Fab : ĠFloating ActionButton Ġ= ĠfindViewById ( R . id . v Fab ) ĊĊĠĠĠ Ġprivate Ġval Ġadapter : ĠAdapter Comments ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġdisable Shadow s () ĊĠĠĠĠĠĠĠ Ġdisable Navigation () ĊĠĠĠĠĠĠĠ ĠsetTitle ( t ( API _ TRANSL ATE . app _ comments )) ĊĊĠĠĠĠĠĠĠ Ġv Recycler . layout Manager Ġ= ĠLinearLayoutManager ( context ) ĊĊĠĠĠĠĠĠĠ Ġadapter Ġ= ĠAdapter Comments ( publication Id , Ġcomment Id , Ġv Recycler ) ĊĊĠĠĠĠĠĠĠ Ġv Fab . setOnClickListener Ġ{ ĠSpl ash Comment ( publication Id , Ġfalse ) Ġ{ Ġcomment Ġ-> Ġadapter . add Comment ( comment ) Ġ}. as Sheet Show () Ġ} ĊĠĠĠĠĠĠĠ Ġv Recycler . adapter Ġ= Ġadapter ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġ// ĊĠĠĠ Ġ// Ġ ĠEvent Bus ĊĠĠĠ Ġ// ĊĊĠĠĠ Ġprivate Ġfun Ġon Event Comments Count Changed ( e : ĠEvent Comments Count Changed ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( e . publication Id Ġ== Ġpublication Id ) Ġadapter . load Bottom () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġon Event Publication Remove ( e : ĠEvent Publication Remove ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( e . publication Id Ġ== Ġpublication Id ) ĠNavigator . remove ( this ) ĊĠĠĠ Ġ} Ċ Ċ }