diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt index 62f8d49..06deb79 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt @@ -53,7 +53,7 @@ class TransfersLoader(private var mContext: Context?, private val mLifeCycle: Li private val TAG = this.javaClass.name /** Constant that specifies if we are on debug mode */ - private val DEBUG = false + private val DEBUG = true /* Constant used to fix the number of historical transfers to fetch from the network in one batch */ private val HISTORICAL_TRANSFER_BATCH_SIZE = 100 diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/repositories/TransferRepository.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/repositories/TransferRepository.kt index 7f7f2f1..821d754 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/repositories/TransferRepository.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/repositories/TransferRepository.kt @@ -25,7 +25,7 @@ class TransferRepository internal constructor(context: Context) { } fun deleteAll() { - mTransferDao.deleteAll() + deleteAllAsyncTask(mTransferDao).execute() } private class insertAllAsyncTask internal constructor(private val mAsyncTaskDao: TransferDao) : @@ -36,4 +36,13 @@ class TransferRepository internal constructor(context: Context) { return null } } + + private class deleteAllAsyncTask internal constructor(private val mAsyncTaskDao: TransferDao) : + AsyncTask() { + + override fun doInBackground(vararg params: Void?): Void? { + mAsyncTaskDao.deleteAll() + return null + } + } } \ No newline at end of file