Enable the transaction direction filter, the user can apply the filter and see all transactions or just the sent or received.

This commit is contained in:
Severiano Jaramillo 2019-01-02 09:27:25 -06:00
parent ddf7f16c2b
commit 242fe7656a
3 changed files with 8 additions and 63 deletions

View file

@ -1,55 +0,0 @@
{
"project_info": {
"project_number": "644483315839",
"firebase_url": "https://bitsy-wallet.firebaseio.com",
"project_id": "bitsy-wallet",
"storage_bucket": "bitsy-wallet.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:644483315839:android:4984a6b363726b70",
"android_client_info": {
"package_name": "cy.agorise.bitsybitshareswallet"
}
},
"oauth_client": [
{
"client_id": "644483315839-q813epbu919ise2peubfeagbi0hcuphc.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "cy.agorise.bitsybitshareswallet",
"certificate_hash": "0807b8ec7b1e00822924a808a6ad84761cd2691a"
}
},
{
"client_id": "644483315839-l19le5quoa3a96dernh2m6v3e76rqd8p.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyB5N3o3CRWyiWyFw6zDprWYWIt2d1AI6Ns"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "644483315839-l19le5quoa3a96dernh2m6v3e76rqd8p.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}

View file

@ -282,12 +282,12 @@ class FilterOptionsDialog : DialogFragment() {
// }
private fun validateFields() {
val filterTransactionsDirection = 0 //when {
// rbTransactionAll.isChecked -> 0
// rbTransactionSent.isChecked -> 1
// rbTransactionReceived.isChecked -> 2
// else -> { 0 }
// }
val filterTransactionsDirection = when {
rbTransactionAll.isChecked -> 0
rbTransactionSent.isChecked -> 1
rbTransactionReceived.isChecked -> 2
else -> { 0 }
}
val filterDateRangeAll = cbDateRange.isChecked

View file

@ -147,11 +147,11 @@ class TransactionsFragment : Fragment(), FilterOptionsDialog.OnFilterOptionsSele
for (transferDetail in transfersDetails) {
// Filter by transfer direction
if (transferDetail.direction) { // Transfer sent
if (filterTransactionsDirection == 2)
if (filterTransactionsDirection == 1)
// Looking for received transfers only
continue
} else { // Transfer received
if (filterTransactionsDirection == 1)
if (filterTransactionsDirection == 2)
// Looking for sent transactions only
continue
}