This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handler().postDelayed({scan_animation?.playAnimation()}, 300) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lifecycleScope.launch { | |
delay(300) | |
scan_animation?.playAnimation() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suspend fun getOnboardingInfoAndSmartMessage() = supervisorScope { | |
withContext(Dispatchers.IO) { | |
var onBoardingFacades: Array<OnBoardingFacade> = try { | |
async { | |
facadeManager.getOnBoardingInfo() | |
}.await() | |
} catch (throwable: Throwable) { | |
val onBoardingFacade = OnBoardingFacade().apply { | |
error = throwable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PayBillViewModel : AuspostViewModel() { | |
@Inject | |
lateinit var payBillManager: PayBillManager | |
@Inject | |
lateinit var save: StateLiveData<Unit> | |
@Inject | |
lateinit var delete: StateLiveData<Unit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomerActivity : BaseActivity(R.layout.activity_customer) { | |
@Inject | |
lateinit var customerManager: CustomerManager | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PayBillActivity() : BaseActivity(R.layout.activity_pay_bill) { | |
val payBillManager: IPayBillManager by inject() | |
override fun getScope(): Scope { | |
return super.getScope().installModules(module { | |
bind<IPayBillDao>().toClass<PayBillDao>() | |
bind<IPayBillManager>().toClass<PayBillManager>() | |
}) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class BaseActivity(@LayoutRes contentLayoutId: Int) : AppCompatActivity(contentLayoutId) { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
getScope().supportScopeAnnotation(ActivityScope::class.java) | |
.installModules(ActivityModule(this)) | |
.closeOnDestroy(this) | |
.inject(this) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
class CustomerManager @Inject constructor (val customerDao: CustomerDao) { | |
fun getCustomerDetails(): Single<Customer> { | |
return customerDao.getCustomerDetails() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomerActivity : BaseActivity(R.layout.activity_customer) { | |
@Inject lateinit var customerManager: CustomerManager | |
override fun onCreate(savedInstanceState: Bundle?) { | |
KTP.openRootScope() | |
.openSubScope(APPSCOPE) | |
.openSubScope(this) | |
.supportScopeAnnotation(ActivityScope::class.java) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PayBillActivity() : BaseActivity(R.layout.activity_pay_bill) { | |
val payBillManager: IPayBillManager by inject() | |
override fun onCreate(savedInstanceState: Bundle?) { | |
KTP.openRootScope() | |
.openSubScope(APPSCOPE) | |
.openSubScope(this) | |
.installModules(module { bind<IPayBillManager>().toClass<PayBillManager>()}) | |
.closeOnDestroy(this) |