Skip to content

Commit

Permalink
migrate transfer process screen to compose openMF#2583
Browse files Browse the repository at this point in the history
  • Loading branch information
Saifuddin53 committed May 14, 2024
1 parent f064655 commit 896af28
Show file tree
Hide file tree
Showing 9 changed files with 693 additions and 297 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import org.mifos.mobile.ui.getThemeAttributeColor
import org.mifos.mobile.ui.help.HelpActivity
import org.mifos.mobile.ui.home.HomeOldFragment
import org.mifos.mobile.ui.login.LoginActivity
import org.mifos.mobile.ui.transfer_process.TransferProcessComposeFragment
import org.mifos.mobile.utils.Constants
import org.mifos.mobile.utils.TextDrawable
import org.mifos.mobile.utils.Toaster
Expand Down Expand Up @@ -383,8 +384,7 @@ class HomeActivity :
doubleBackToExitPressedOnce = true
Toaster.show(findViewById(android.R.id.content), getString(R.string.exit_message))
Handler().postDelayed({ doubleBackToExitPressedOnce = false }, 2000)
} else if (fragment is TransferProcessFragment) {
fragment.cancelTransferProcess()
} else if (fragment is TransferProcessComposeFragment) {
}

if (stackCount() != 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import org.mifos.mobile.ui.activities.base.BaseActivity
import org.mifos.mobile.ui.adapters.AccountsSpinnerAdapter
import org.mifos.mobile.ui.enums.TransferType
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.ui.transfer_process.TransferProcessComposeFragment
import org.mifos.mobile.utils.Constants
import org.mifos.mobile.utils.DateHelper
import org.mifos.mobile.utils.Network
Expand Down Expand Up @@ -159,7 +160,7 @@ class SavingsMakeTransferFragment : BaseFragment() {
}

/**
* Checks validation of `etRemark` and then opens [TransferProcessFragment] for
* Checks validation of `etRemark` and then opens [TransferProcessComposeFragment] for
* initiating the transfer
*/
private fun reviewTransfer() {
Expand All @@ -182,7 +183,7 @@ class SavingsMakeTransferFragment : BaseFragment() {
transferPayload?.fromAccountNumber = fromAccountOption?.accountNo
transferPayload?.toAccountNumber = toAccountOption?.accountNo
(activity as BaseActivity?)?.replaceFragment(
TransferProcessFragment.newInstance(
TransferProcessComposeFragment.newInstance(
transferPayload,
TransferType.SELF,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import org.mifos.mobile.ui.adapters.BeneficiarySpinnerAdapter
import org.mifos.mobile.ui.beneficiary.presentation.BeneficiaryAddOptionsFragment
import org.mifos.mobile.ui.enums.TransferType
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.ui.transfer_process.TransferProcessComposeFragment
import org.mifos.mobile.utils.Constants
import org.mifos.mobile.utils.DateHelper
import org.mifos.mobile.utils.Network
Expand Down Expand Up @@ -205,7 +206,7 @@ class ThirdPartyTransferFragment : BaseFragment(), OnItemSelectedListener {
}

/**
* Checks validation of `etRemark` and then opens [TransferProcessFragment] for
* Checks validation of `etRemark` and then opens [TransferProcessComposeFragment] for
* initiating the transfer
*/
private fun reviewTransfer() {
Expand Down Expand Up @@ -242,7 +243,7 @@ class ThirdPartyTransferFragment : BaseFragment(), OnItemSelectedListener {
transferPayload.fromAccountNumber = fromAccountOption?.accountNo
transferPayload.toAccountNumber = beneficiaryAccountOption?.accountNo
(activity as BaseActivity?)?.replaceFragment(
TransferProcessFragment.newInstance(
TransferProcessComposeFragment.newInstance(
transferPayload,
TransferType.TPT,
),
Expand Down
Loading

0 comments on commit 896af28

Please sign in to comment.