Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: removed obsolete files from the project #2390

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import org.mifos.mobile.models.accounts.savings.Transactions
import org.mifos.mobile.ui.adapters.CheckBoxAdapter
import org.mifos.mobile.ui.adapters.SavingAccountsTransactionListAdapter
import org.mifos.mobile.ui.fragments.base.BaseFragment
import org.mifos.mobile.ui.views.SavingAccountsTransactionView
import org.mifos.mobile.utils.CheckBoxStatusUtil
import org.mifos.mobile.utils.Constants
import org.mifos.mobile.utils.DateHelper
Expand All @@ -41,19 +40,18 @@ import org.mifos.mobile.utils.StatusUtils
import org.mifos.mobile.utils.Toaster
import org.mifos.mobile.utils.getDatePickerDialog
import org.mifos.mobile.viewModels.SavingAccountsTransactionViewModel
import java.lang.IllegalStateException
import java.time.Instant
import javax.inject.Inject

/**
* Created by dilpreet on 6/3/17.
*/
@AndroidEntryPoint
class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransactionView {
class SavingAccountsTransactionFragment : BaseFragment() {

private var _binding: FragmentSavingAccountTransactionsBinding? = null
private val binding get() = _binding!!
private lateinit var viewModel : SavingAccountsTransactionViewModel
private lateinit var viewModel: SavingAccountsTransactionViewModel

@JvmField
@Inject
Expand Down Expand Up @@ -108,7 +106,7 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
}

viewModel.savingAccountsTransactionUiState.observe(viewLifecycleOwner) { state ->
when(state) {
when (state) {
SavingsAccountUiState.Loading -> showProgress()

SavingsAccountUiState.Error -> {
Expand Down Expand Up @@ -152,7 +150,7 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
/**
* Setting up basic components
*/
override fun showUserInterface() {
fun showUserInterface() {
val layoutManager = LinearLayoutManager(activity)
layoutManager.orientation = LinearLayoutManager.VERTICAL
binding.rvSavingAccountsTransaction.setHasFixedSize(true)
Expand All @@ -172,7 +170,7 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
*
* @param savingsWithAssociations Contains [Transactions] for given Savings account.
*/
override fun showSavingAccountsDetail(savingsWithAssociations: SavingsWithAssociations?) {
fun showSavingAccountsDetail(savingsWithAssociations: SavingsWithAssociations?) {
binding.llAccount.visibility = View.VISIBLE
this.savingsWithAssociations = savingsWithAssociations
transactionsList = savingsWithAssociations?.transactions
Expand All @@ -189,7 +187,7 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
*
* @param message Error message that tells the user about the problem.
*/
override fun showErrorFetchingSavingAccountsDetail(message: String?) {
fun showErrorFetchingSavingAccountsDetail(message: String?) {
if (!Network.isConnected(activity)) {
sweetUIErrorHandler?.showSweetNoInternetUI(
binding.rvSavingAccountsTransaction,
Expand Down Expand Up @@ -223,7 +221,7 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
/**
* Provides with a filtered list according to the constraints used in `filter()` function
*/
override fun showFilteredList(list: List<Transactions?>?) {
fun showFilteredList(list: List<Transactions?>?) {
if (!list.isNullOrEmpty()) {
Toaster.show(binding.root, getString(R.string.filtered))
transactionListAdapter?.setSavingAccountsTransactionList(list)
Expand All @@ -232,7 +230,7 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
}
}

override fun showEmptyTransactions() {
fun showEmptyTransactions() {
sweetUIErrorHandler?.showSweetEmptyUI(
getString(R.string.transactions),
R.drawable.ic_compare_arrows_black_24dp,
Expand Down Expand Up @@ -277,11 +275,11 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
return startDate <= endDate
}

override fun showProgress() {
fun showProgress() {
showProgressBar()
}

override fun hideProgress() {
fun hideProgress() {
hideProgressBar()
}

Expand Down Expand Up @@ -431,16 +429,16 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
*/
private fun filterSavingsAccountTransactionsByType(statusModelList: List<CheckboxStatus?>?): List<Transactions?> {
val filteredSavingsTransactions: MutableList<Transactions?> = ArrayList()
for (status in viewModel
.getCheckedStatus(statusModelList)!!) {
viewModel
.filterTransactionListByType(transactionsList, status, getCheckBoxStatusStrings())
?.let { filteredSavingsTransactions.addAll(it) }
}
for (status in viewModel
.getCheckedStatus(statusModelList)!!) {
viewModel
.filterTransactionListByType(transactionsList, status, getCheckBoxStatusStrings())
?.let { filteredSavingsTransactions.addAll(it) }
}
return filteredSavingsTransactions
}

private fun getCheckBoxStatusStrings() : CheckBoxStatusUtil{
private fun getCheckBoxStatusStrings(): CheckBoxStatusUtil {
return CheckBoxStatusUtil().apply {
this.depositString = context?.getString(R.string.deposit)
this.dividendPayoutString = context?.getString(R.string.dividend_payout)
Expand All @@ -452,6 +450,7 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact
this.overdraftFeeString = context?.getString(R.string.overdraft_fee)
}
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.menu_filter_savings_transactions -> showFilterDialog()
Expand Down

This file was deleted.

16 changes: 0 additions & 16 deletions app/src/main/java/org/mifos/mobile/ui/views/AccountsView.kt

This file was deleted.

15 changes: 0 additions & 15 deletions app/src/main/java/org/mifos/mobile/ui/views/AddGuarantorView.kt

This file was deleted.

13 changes: 0 additions & 13 deletions app/src/main/java/org/mifos/mobile/ui/views/BeneficiariesView.kt

This file was deleted.

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions app/src/main/java/org/mifos/mobile/ui/views/ClientChargeView.kt

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/java/org/mifos/mobile/ui/views/GuarantorDetailView.kt

This file was deleted.

11 changes: 0 additions & 11 deletions app/src/main/java/org/mifos/mobile/ui/views/GuarantorListView.kt

This file was deleted.

11 changes: 0 additions & 11 deletions app/src/main/java/org/mifos/mobile/ui/views/HelpView.kt

This file was deleted.

18 changes: 0 additions & 18 deletions app/src/main/java/org/mifos/mobile/ui/views/HomeOldView.kt

This file was deleted.

16 changes: 0 additions & 16 deletions app/src/main/java/org/mifos/mobile/ui/views/HomeView.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading