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:
parent
ddf7f16c2b
commit
f279512c57
2 changed files with 8 additions and 8 deletions
|
@ -282,12 +282,12 @@ class FilterOptionsDialog : DialogFragment() {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
private fun validateFields() {
|
private fun validateFields() {
|
||||||
val filterTransactionsDirection = 0 //when {
|
val filterTransactionsDirection = when {
|
||||||
// rbTransactionAll.isChecked -> 0
|
rbTransactionAll.isChecked -> 0
|
||||||
// rbTransactionSent.isChecked -> 1
|
rbTransactionSent.isChecked -> 1
|
||||||
// rbTransactionReceived.isChecked -> 2
|
rbTransactionReceived.isChecked -> 2
|
||||||
// else -> { 0 }
|
else -> { 0 }
|
||||||
// }
|
}
|
||||||
|
|
||||||
val filterDateRangeAll = cbDateRange.isChecked
|
val filterDateRangeAll = cbDateRange.isChecked
|
||||||
|
|
||||||
|
|
|
@ -147,11 +147,11 @@ class TransactionsFragment : Fragment(), FilterOptionsDialog.OnFilterOptionsSele
|
||||||
for (transferDetail in transfersDetails) {
|
for (transferDetail in transfersDetails) {
|
||||||
// Filter by transfer direction
|
// Filter by transfer direction
|
||||||
if (transferDetail.direction) { // Transfer sent
|
if (transferDetail.direction) { // Transfer sent
|
||||||
if (filterTransactionsDirection == 2)
|
if (filterTransactionsDirection == 1)
|
||||||
// Looking for received transfers only
|
// Looking for received transfers only
|
||||||
continue
|
continue
|
||||||
} else { // Transfer received
|
} else { // Transfer received
|
||||||
if (filterTransactionsDirection == 1)
|
if (filterTransactionsDirection == 2)
|
||||||
// Looking for sent transactions only
|
// Looking for sent transactions only
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue