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 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
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
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
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
@Dao | |
interface PayBillDao { | |
@Query("SELECT * from saved_bills ORDER BY biller_name") | |
suspend fun getAll(): List<SavedBill> | |
@Insert(onConflict = OnConflictStrategy.REPLACE) | |
suspend fun insert(savedBill: SavedBill) | |
@Query("DELETE from saved_bills where _id = :id") |
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 | |
open class PayBillManager { | |
@Inject | |
lateinit var db: IPaybillDataProvider | |
open suspend fun save(bill: SavedBill?) { | |
if (bill != null) { | |
db.payBillDao().insert(bill) | |
} |
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
#!/bin/bash | |
set -e | |
echo "----- Build and Publish Snapshot -----" | |
chmod u+x gradlew | |
time1=$(date '+%s') | |
./gradlew --no-daemon --parallel \ |
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
#!/bin/bash | |
set -e | |
echo "----- Build and Publish Snapshot -----" | |
chmod u+x gradlew | |
time1=$(date '+%s') | |
./gradlew --no-daemon --parallel \ |
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
interface GreetingService { | |
fun greetings(): String | |
} | |
class GreetingServiceImpl(private val messageData: MessageData, private val timeService: TimeService) : | |
GreetingService { | |
override fun greetings(): String { | |
val timeOfDay = when (timeService.getHourOfDay()) { |