Skip to content

Commit

Permalink
migrate transfer process screen to compose #2583
Browse files Browse the repository at this point in the history
  • Loading branch information
Saifuddin53 committed May 16, 2024
1 parent f064655 commit 998c1d9
Show file tree
Hide file tree
Showing 9 changed files with 683 additions and 299 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
@@ -1,7 +1,6 @@
package org.mifos.mobile.ui.fragments

import android.os.Bundle
import android.os.Parcelable
import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuInflater
Expand All @@ -22,11 +21,11 @@ import org.mifos.mobile.databinding.FragmentSavingsMakeTransferBinding
import org.mifos.mobile.models.payload.TransferPayload
import org.mifos.mobile.models.templates.account.AccountOption
import org.mifos.mobile.models.templates.account.AccountOptionsTemplate
import org.mifos.mobile.ui.activities.SavingsAccountContainerActivity
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 +158,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 +181,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 998c1d9

Please sign in to comment.