/* Ċ Ġ* Ġ***************************************************************** ******************************** Ċ Ġ* ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCopyright Ġ 2 0 1 8 ĠUnivers um ĠSt ud ios Ċ Ġ* Ġ***************************************************************** ******************************** Ċ Ġ* ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License ") Ċ Ġ* Ġ------------------------------------------------------------------------------------------------ - Ċ Ġ* ĠYou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe Ċ Ġ* ĠLicense Ġat Ċ Ġ* ĠĊ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ġdistributed Ġunder Ġthe ĠLicense Ċ Ġ* Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ċ Ġ* Ġor Ġimplied . Ċ Ġ* ĠĊ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ* Ġ***************************************************************** ******************************** Ċ Ġ*/ Ċ package Ġun ivers um . mind . syn ergy . challenge . view Ċ Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġun ivers um . mind . syn ergy . challenge . control . Challenge Controller Ċ import Ġun ivers um . mind . syn ergy . challenge . control . Default Challenge Controller Ċ import Ġun ivers um . mind . syn ergy . challenge . view . presentation . Challenge Presenter Ċ import Ġun ivers um . mind . syn ergy . challenge . view . presentation . Default Challenge Presenter Ċ import Ġun ivers um . mind . syn ergy . device . head set . Head set Ċ import Ġun ivers um . mind . syn ergy . view . Base Fragment Module Ċ import Ġun ivers um . mind . syn ergy . view . Empty Fragment Module Ċ import Ġun ivers um . stud ios . android . ark h ite k ton . interaction . Interactor Ċ Ċ /** Ċ Ġ* Ġ@ author ĠMartin ĠAl bed in sky Ċ Ġ*/ Ċ @ Module ( includes Ġ= Ġ[ Empty Fragment Module :: class ]) Ċ class ĠChallenge Fragment Module Ġ: ĠBase Fragment Module () Ġ{ ĊĊ ĉ @ Provides Ġfun Ġprovide Controller ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfragment : ĠChallenge Fragment , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinter actor : ĠInter actor , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpresenter : ĠChallenge Presenter , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhead set : ĠHead set Ċ ĉ ): ĠChallenge Controller Ġ{ ĊĉĠĠĠ Ġval Ġholder Ġ= Ġprovide Controller Holder ( fragment , ĠChallenge Controller . Holder :: class . java ) Ċĉ ĉ return Ġif Ġ( holder . has Controller ()) Ġholder . get Controller () Ċĉ ĉ else Ġholder . attach Controller ( Default Challenge Controller . Builder ( inter actor , Ġpresenter ) Ċĉĉĉ ĉ . apply Ġ{ Ġthis . head set Ġ= Ġhead set Ġ} Ċĉĉĉ ĉ . build ()) Ċ ĉ } ĊĉĊ ĉ @ Provides Ġfun Ġprovide Presenter ( viewModel : ĠChallenge ViewModel ): ĠChallenge Presenter Ġ= ĠDefault Challenge Presenter ( viewModel ) Ċ ĉ @ Provides Ġfun Ġprovide ViewModel ( fragment : ĠChallenge Fragment ): ĠChallenge ViewModel Ġ= Ġprovide ViewModel ( fragment , ĠChallenge ViewModel Impl :: class . java ) Ċ }