package Ġt aiwan . no 1 . app . mvp . present ers . fragment Ċ Ċ import Ġcom . dev rapid . kot link n ifer . lo ge Ċ import Ġrx . lang . kotlin . subscriber Ċ import Ġt aiwan . no 1 . app . domain . use case . Tv Season Detail Ċ import Ġt aiwan . no 1 . app . mvp . contracts . fragment . Tv Season Contract Ċ import Ġt aiwan . no 1 . app . mvp . models . tv . Tv Se asons Model Ċ Ċ /** Ċ Ġ* Ġ@ author ĠJ i ey i Ċ Ġ* Ġ* Ċ Ġ* Ġ@ since Ġ 3 / 6 / 1 7 Ċ Ġ*/ Ċ Ċ class ĠT v Season Presenter Ġconstructor ( val Ġtv Season Detail : ĠT v Season Detail ): ĊĠĠĠĠĠĠĠ ĠBase Presenter < Tv Season Contract . View >(), ĠT v Season Contract . Presenter Ġ{ ĊĠĠĠ Ġprivate Ġvar Ġtv Season Model : ĠT v Se asons Model Ġ= ĠT v Se asons Model () ĊĊĠĠĠ Ġ// region ĠPres enter Ġimplementation ĊĠĠĠ Ġoverride Ġfun Ġinit ( view : ĠT v Season Contract . View ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . init ( view ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġrequest Season Detail ( tv Id : ĠInt , Ġseason Number : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . view . show Loading () ĊĠĠĠĠĠĠĠĠĊĠĠĠĠĠĠĠ Ġval Ġrequest Ġ= ĠT v Season Detail . Requests ( tv Id , Ġseason Number ) ĊĠĠĠĠĠĠĠ Ġrequest . fragment Lifecycle Ġ= Ġthis . view . get Lifecycle () ĊĠĠĠĠĠĠĠ Ġ// ĠIf Ġdeclaring Ġ[ subscriber ] Ġas Ġa Ġvariable , Ġit Ġwon 't Ġbe Ġused Ġagain . ĊĠĠĠĠĠĠĠ Ġthis . tv Season Detail . execute ( request , Ġsubscriber < Tv Se asons Model >(). onError Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlo ge ( it . message ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlo ge ( it ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . view . show Retry () ĊĠĠĠĠĠĠĠ Ġ}. onNext Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . tv Season Model Ġ= Ġit ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . view . show Tv Overview ( it . overview . or Empty ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . view . show Tv Cast s ( it . credits ?. cast ?. filter Ġ{ Ġnull Ġ!= Ġit . profile _ path Ġ}. or Empty ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . view . show Tv Cre ws ( it . credits ?. cre w ?. filter Ġ{ Ġnull Ġ!= Ġit . profile _ path Ġ}. or Empty ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . view . show Tv Episode s ( it . episodes . or Empty ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . view . show Tv Trail ers ( it . videos ?. results . or Empty ()) ĊĠĠĠĠĠĠĠ Ġ}. on Completed Ġ{ Ġthis . view . hide Loading () Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ// endregion Ċ } Ċ