Skip to content

Commit

Permalink
refactor #2511: migrated savings account detail screen to compose
Browse files Browse the repository at this point in the history
  • Loading branch information
AvneetSingh2001 committed Feb 15, 2024
1 parent 4b19bbc commit 428339d
Show file tree
Hide file tree
Showing 19 changed files with 985 additions and 521 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package org.mifos.mobile.ui.activities

import android.os.Bundle
import android.view.View
import org.mifos.mobile.R
import org.mifos.mobile.databinding.ActivityContainerBinding
import org.mifos.mobile.ui.activities.base.BaseActivity
import org.mifos.mobile.ui.fragments.SavingAccountsDetailFragment
import org.mifos.mobile.ui.savings_account.SavingAccountsDetailFragment
import org.mifos.mobile.utils.Constants

/**
Expand Down Expand Up @@ -35,6 +36,18 @@ class SavingsAccountContainerActivity : BaseActivity() {
}
}

fun hideToolbar() {
binding.apply {
toolbar?.visibility = View.GONE
}
}

fun showToolbar() {
binding.apply {
toolbar?.visibility = View.VISIBLE
}
}

companion object {
var transferSuccess = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import kotlinx.coroutines.launch
import org.mifos.mobile.R
import org.mifos.mobile.databinding.FragmentClientChargeBinding
import org.mifos.mobile.models.Charge
import org.mifos.mobile.ui.activities.SavingsAccountContainerActivity
import org.mifos.mobile.ui.adapters.ClientChargeAdapter
import org.mifos.mobile.ui.enums.ChargeType
import org.mifos.mobile.ui.fragments.base.BaseFragment
Expand Down Expand Up @@ -46,6 +47,7 @@ class ClientChargeFragment : BaseFragment() {
private var sweetUIErrorHandler: SweetUIErrorHandler? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
(activity as? SavingsAccountContainerActivity)?.showToolbar()
if (arguments != null) {
id = arguments?.getLong(Constants.CLIENT_ID)
chargeType = arguments?.getSerializable(Constants.CHARGE_TYPE) as ChargeType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import android.view.ViewGroup
import dagger.hilt.android.AndroidEntryPoint
import org.mifos.mobile.R
import org.mifos.mobile.databinding.FragmentQrCodeDisplayBinding
import org.mifos.mobile.ui.activities.SavingsAccountContainerActivity
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.utils.Constants
import org.mifos.mobile.utils.QrCodeGenerator
Expand All @@ -29,6 +30,7 @@ class QrCodeDisplayFragment : BaseFragment() {
private var json: String? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
(activity as? SavingsAccountContainerActivity)?.showToolbar()
if (arguments != null) {
json = arguments?.getString(Constants.QR_DATA)
}
Expand Down
Loading

0 comments on commit 428339d

Please sign in to comment.