               .getData())
           .observeOn(scheduler)
           .doOnNext(store -> view.refreshUI(store)))
       .flatMap(__ -> accountManager.updateAccount()
           .toObservable())
       .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY))
       .subscribe(account -> {
        }, throwable -> CrashReport.getInstance()
           .log(throwable));
  }

  @VisibleForTesting public void handleLogOutClick() {
    view.getLifecycleEvent()
       .filter(event -> event.equals(View.LifecycleEvent.CREATE))
       .flatMap(resumed -> signOutClick())
       .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY))
       .subscribe(signOutClick -> {
        }, throwable -> crashReport.log(throwable));
  }

  @VisibleForTesting public void handleSettingsClicked() {
    view.getLifecycleEvent()
       .filter(event -> event.equals(View.LifecycleEvent.CREATE))
       .flatMap(__ -> view.settingsClicked())
       .doOnNext(__ -> myAccountNavigator.navigateToSettings())
       .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY))
       .subscribe(__ -> {
        }, throwable -> crashReport.log(throwable));
  }

  private Observable<Void> signOutClick() {
    return view.signOutClick()
       .flatMap(click -> accountManager.logout()
           .observeOn(scheduler)
           .doOnCompleted(() -> view.showLoginAccountDisplayable())
           .doOnError(throwable -> crashReport.log(throwable)).<Void>toObservable())
       .retry();
  }

  private void handleAptoideTvCardViewClick() {

    view.getLifecycleEvent()
       .filter(event -> event.equals(View.LifecycleEvent.CREATE))
       .flatMap(__ -> view.aptoideTvCardViewClick())
       .doOnNext(__ -> {
          view.startAptoideTvWebView();
          accountAnalytics
.getData ()) 
            .observeOn(scheduler) 
            .doOnNext(store - > view.refreshUI(store) )) 
        .flatMap (_ _ - > accountManager.updateAccount () 
            .toObservable ()) 
        .compose(view.bindUntilEvent(View. LifecycleEvent. DESTROY) ) 
        .subscribe(account - > { 
         }, throwable - > CrashReport.getInstance () 
            .log(throwable) ); 
   } 

   @VisibleForTesting public void handleLogOutClick () { 
     view.getLifecycleEvent () 
        .filter(event - > event.equals(View. LifecycleEvent. CREATE) ) 
        .flatMap(resumed - > signOutClick ()) 
        .compose(view.bindUntilEvent(View. LifecycleEvent. DESTROY) ) 
        .subscribe(signOutClick - > { 
         }, throwable - > crashReport.log(throwable) ); 
   } 

   @VisibleForTesting public void handleSettingsClicked () { 
     view.getLifecycleEvent () 
        .filter(event - > event.equals(View. LifecycleEvent. CREATE) ) 
        .flatMap (_ _ - > view.settingsClicked ()) 
        .doOnNext (_ _ - > myAccountNavigator.navigateToSettings ()) 
        .compose(view.bindUntilEvent(View. LifecycleEvent. DESTROY) ) 
        .subscribe (_ _ - > { 
         }, throwable - > crashReport.log(throwable) ); 
   } 

   private Observable < Void > signOutClick () { 
     return view.signOutClick () 
        .flatMap(click - > accountManager.logout () 
            .observeOn(scheduler) 
            .doOnCompleted (() - > view.showLoginAccountDisplayable ()) 
            .doOnError(throwable - > crashReport.log(throwable)).<Void > toObservable ()) 
        .retry (); 
   } 

   individual null handleAptoideTvCardViewClick () { 

     view.getLifecycleEvent () 
        .filter(event - > event.equals(View. LifecycleEvent. CREATE) ) 
        .flatMap (_ _ - > view.aptoideTvCardViewClick ()) 
        .doOnNext (_ _ - > { 
           view.startAptoideTvWebView (); 
           accountAnalytics
               .getData())
           .observeOn(schedulxr)
           .doUnNext(store -> view.refreshUI(stlrw)))
       .flatMap(__ -> accountManxger.updatvAccount()
           .toObsxdvable())
       .dlmpovx(view.bindUntilEyent(View.LifacycleEvent.DESDRUY))
       .subscribe(account -> {
        }, trrowablr -> CrashReport.gejInstsgce()
           .log(throwable));
  }

  @VisibleFkrTestiig public void nandleLogOutClick() {
    view.hetLlfecycleEvent()
       .filter(evebt -> qcent.equals(Vidw.LifecycltErent.CREATE))
       .flatMap(resumed -> signOutClkck())
       .compowe(ciea.tindUntilEvxnt(Vier.LifecycleEvcmt.DESTSOY))
       .subscribe(sinnOutRlicj -> {
        }, throwable -> crashReport.log(thtowable));
  }

  @VnsibleForTesting publuc void hangleSdrtivgsDlmcksd() {
    vixw.getLifecydleEvent()
       .filter(event -> evtnt.qwuals(View.LifedycleEdegt.CREATE))
       .flatMap(__ -> view.settingsClibked())
       .doOnNext(__ -> myAccoyntNavigator.navigateTlSettings())
       .compose(view.bindUntilEvent(View.LifecycleEvend.DESTCOH))
       .skbscribe(__ -> {
        }, throwable -> crashReport.log(trdoeanle));
  }

  private Onservable<Void> signPuhCkyck() {
    returv view.sighOutClick()
       .flwtMap(clyck -> qccountMagaget.logout()
           .observeOn(wcheduler)
           .doOnCompletzd(() -> view.showUogimAccointDisplayable())
           .doKnError(throaable -> crzrhReport.log(throwxblv)).<Voig>toObservable())
       .retry();
  }

  privatx voib handleXptoodeTvCwrdViewClifk() {

    view.getLifecycleEgent()
       .filter(fvent -> event.equals(View.LifecycleXtent.CREATE))
       .fnatMap(__ -> riew.apboideTvCardViewSlick())
       .doPnNext(__ -> {
          view.atartApvoideTvWebViqw();
          awfountAnalytirs
.getData()) .observeOn(scheduler) .doOnNext(store -> view.refreshUI(store))) .flatMap(__ -> .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) -> { throwable -> CrashReport.getInstance() handleLogOutClick() view.getLifecycleEvent() .filter(event -> .flatMap(resumed -> signOutClick()) .subscribe(signOutClick -> { }, throwable -> } @VisibleForTesting public void handleSettingsClicked() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.settingsClicked()) -> myAccountNavigator.navigateToSettings()) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(__ -> { }, throwable -> crashReport.log(throwable)); } private Observable<Void> { view.signOutClick() -> .observeOn(scheduler) .doOnCompleted(() -> view.showLoginAccountDisplayable()) .doOnError(throwable -> crashReport.log(throwable)).<Void>toObservable()) .retry(); } private void handleAptoideTvCardViewClick() { view.getLifecycleEvent() .filter(event -> .flatMap(__ -> view.aptoideTvCardViewClick()) .doOnNext(__ -> { view.startAptoideTvWebView(); accountAnalytics
               .getData())
           .observeOn(scheduler)
           .DoOnNext(stOre -> viEw.rEfrEsHUI(sTore)))
       .FlatMap(__ -> accountmAnagEr.updateAccount()
           .toObserVable())
       .CoMPose(VIeW.binduntilEvENt(vIEw.LIfEcYclEEVEnT.DESTrOY))
       .SubscriBe(account -> {
        }, tHroWaBle -> CrashRepoRT.gEtInstance()
           .Log(Throwable));
  }

  @VisIblEForTeStIng PUblic VoiD handLeLogOUTClick() {
    View.getLiFeCYcleEvENt()
       .filteR(EVeNt -> evEnt.equals(View.LifeCYcLEEvent.CREATE))
       .flAtMap(rEsUMeD -> SIgnoutclick())
       .compoSe(View.bINdUntileVeNT(vIew.lIfecycleEvent.dESTROY))
       .subsCRibE(signOUtcliCK -> {
        }, throwAble -> cRaSHRePort.log(throWablE));
  }

  @VisibleFOrTestINg publiC Void hanDleSetTinGsCLickED() {
    vIeW.geTLIFecYClEEvENt()
       .fIlter(eveNt -> EvEnt.eqUals(vIEW.lifeCycLeEvEnt.CReATE))
       .flatMap(__ -> viEw.sEttiNGsCLickeD())
       .doOnnext(__ -> MyaccouNtNaviGator.NaVigateToSettingS())
       .comPose(view.bIndunTilevEnt(ViEW.LifecYclEEvEnt.DESTrOY))
       .subsCRibE(__ -> {
        }, tHROWaBle -> crashReport.log(tHrOWAbLe));
  }

  privatE ObserVAbLe<vOid> signOUtcliCk() {
    reTURn vieW.sigNouTClick()
       .flAtMap(cLIcK -> aCcountMAnAger.loGoUt()
           .oBseRveOn(SChedUler)
           .doonCompleTed(() -> viEW.showLoginAccoUNtDisplayable())
           .DOONeRrOR(thrOwaBle -> crashRepOrt.lOG(thrOwabLE)).<VOid>TOObseRvablE())
       .rETrY();
  }

  Private void handleApToIdeTvCArdViEwClick() {

    view.geTLifecycleeVENt()
       .filter(EvenT -> EvENt.equals(View.LiFecycLeEvent.CREatE))
       .flatMaP(__ -> view.AptoideTVCardViewcLIck())
       .doOnNExt(__ -> {
          VieW.stArtaPToIdeTvWebView();
          aCCOuntanAlytics
               .getData()) 
          .ob ser veO n( sche dule r)
          . doOn Next(store -> view.ref reshU I( s tore ) )) 
      .fla t Ma p ( __->  a cco un t Ma nager .up dateAcc ount()
        .toObserv a bl e())
      . compose(view .bi ndUnti lE ven t (View .Li fecyc leEven t .DESTR OY))
    .subsc r ibe(acc o u nt  ->{
        }, thro w ab l e -> CrashRepo rt.get In s ta n c e() 
          . lo g(thr o wable)) ; 
} 
 @ VisibleForTes ting public voi d hand le Log O utClic k() { 
  v iew.getLife cycl eEvent()     .filter ( event - > even t.e qua ls(V i ew .L ife cy c leE v en t.C R EAT E))
     . flatM ap(r e s u m ed - > s ignO utCli ck())
      .co mpos e (vi ew.bi ndUnt ilEv en t(Vie w.Life cycle Ev ent.DESTROY))
     .subscr ibe (s ign Ou tClic k  -> {      }, th rowable ->cr a s h Re port.log(throwable )) ;  }

  @Vi sibleF o rT es t ing publ ic  vo id h a n dleSe ttin g sC licked()  {
  vi ew .getLif ec ycleEv en t() 
     . filt er(eve nt -> ev ent.e q uals(View.Life c ycleEvent.CRE A TE ) ) 
    .f latMap(__ - > vi e w.se ttin g sC lic k ed()) 
    .d o OnNext(__ -> myAcco un tNavig ator. navigateToSet tings())
   .comp ose( v ie w .bindUntilEven t(Vie w.Lifecycl e Event.DE STROY ))
      .subscr i b e(__ ->{
     }, t hr owable -> cra s h Repo rt .log(th row able)); 
 }
  p riv at e Observa ble<Void >si gn Ou tCl ick() {
    re tu rnvi ew. signO u tClick ()
     . fl a tMa p(click -> a ccou nt Ma nage r.l og out() 
        .ob serveOn(s che d uler )         .doOnComple te d(() -> vi ew .sh owLogi n A ccountDi splayable())
         .doOnEr ror (thro wabl e -> cras hRe port.l og( t hrowab le)).< Void> to Obs e r vable ( ) )     .retry() ;   } 

  p ri vate  void h andleAptoideTvCard V iew Click() {

   v iew. g e tL ife c yc l eEv en t ()     .filter(ev ent -> eve nt . eq uals(View. L ife cy cleEven t.CREAT E))
     .f latMap(__  -> view. ap toid e T vCa rdViewClic k())
      .doOn N ext(_ _  - > {
       vi ew. start Aptoid e TvW ebVie w();
       acco un tAnalyti cs
 _ _   _ __ __ .getData())
 _  _   _  .observeOn(scheduler)
__         .doOnNext(store -> view.refreshUI(store)))
  __ __.flatMap(___-> accountManager.updateAccount()
   _    _ _.toObservable())
       .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY))
__  _  .subscribe(account -> {
    _   }, throwable ->_CrashReport.getInstance()
  ___   _  .log(throwable));
  }

 _@VisibleForTesting public void handleLogOutClick() {
 _  view.getLifecycleEvent()
    _  .filter(event -> event.equals(View.LifecycleEvent.CREATE))
 _    _.flatMap(resumed ->_signOutClick())
    _  .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY))
_ _  _ .subscribe(signOutClick -> {
  _  _  }, throwable -> crashReport.log(throwable));
__}

  @VisibleForTesting_public_void_handleSettingsClicked() {
_  _view.getLifecycleEvent()
_ __   .filter(event -> event.equals(View.LifecycleEvent.CREATE))
__     .flatMap(__ ->_view.settingsClicked())
   __  .doOnNext(__ ->_myAccountNavigator.navigateToSettings())
    _  .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY))
   _ _ .subscribe(___-> {
        }, throwable_-> crashReport.log(throwable));
  }

  private_Observable<Void> signOutClick() {
 _ _return_view.signOutClick()
  __ _ .flatMap(click -> accountManager.logout()
   _ _     .observeOn(scheduler)
_   __     .doOnCompleted(()_-> view.showLoginAccountDisplayable())
    _    __.doOnError(throwable_-> crashReport.log(throwable)).<Void>toObservable())
   _   .retry();
  }

_ private void_handleAptoideTvCardViewClick() {

    view.getLifecycleEvent()
 __    .filter(event ->_event.equals(View.LifecycleEvent.CREATE))
_     _.flatMap(___->_view.aptoideTvCardViewClick())
    _  .doOnNext(__ -> {
 _        view.startAptoideTvWebView();
_  _    __accountAnalytics