diff --git a/app/src/main/java/org/mifos/mobile/ui/fragments/SavingAccountsTransactionFragment.kt b/app/src/main/java/org/mifos/mobile/ui/fragments/SavingAccountsTransactionFragment.kt index 922ccb840..da4155b60 100644 --- a/app/src/main/java/org/mifos/mobile/ui/fragments/SavingAccountsTransactionFragment.kt +++ b/app/src/main/java/org/mifos/mobile/ui/fragments/SavingAccountsTransactionFragment.kt @@ -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 @@ -41,7 +40,6 @@ 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 @@ -49,11 +47,11 @@ 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 @@ -108,7 +106,7 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact } viewModel.savingAccountsTransactionUiState.observe(viewLifecycleOwner) { state -> - when(state) { + when (state) { SavingsAccountUiState.Loading -> showProgress() SavingsAccountUiState.Error -> { @@ -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) @@ -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 @@ -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, @@ -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?) { + fun showFilteredList(list: List?) { if (!list.isNullOrEmpty()) { Toaster.show(binding.root, getString(R.string.filtered)) transactionListAdapter?.setSavingAccountsTransactionList(list) @@ -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, @@ -277,11 +275,11 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact return startDate <= endDate } - override fun showProgress() { + fun showProgress() { showProgressBar() } - override fun hideProgress() { + fun hideProgress() { hideProgressBar() } @@ -431,16 +429,16 @@ class SavingAccountsTransactionFragment : BaseFragment(), SavingAccountsTransact */ private fun filterSavingsAccountTransactionsByType(statusModelList: List?): List { val filteredSavingsTransactions: MutableList = 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) @@ -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() diff --git a/app/src/main/java/org/mifos/mobile/ui/views/AccountOverviewMvpView.kt b/app/src/main/java/org/mifos/mobile/ui/views/AccountOverviewMvpView.kt deleted file mode 100644 index 3c3b8d802..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/AccountOverviewMvpView.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/** - * @author Rajan Maurya - * On 16/10/17. - */ -interface AccountOverviewMvpView : MVPView { - fun showTotalLoanSavings(totalLoan: Double?, totalSavings: Double?) - fun showError(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/AccountsView.kt b/app/src/main/java/org/mifos/mobile/ui/views/AccountsView.kt deleted file mode 100644 index bdf28dce8..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/AccountsView.kt +++ /dev/null @@ -1,16 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.accounts.loan.LoanAccount -import org.mifos.mobile.models.accounts.savings.SavingAccount -import org.mifos.mobile.models.accounts.share.ShareAccount -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by Rajan Maurya on 23/10/16. - */ -interface AccountsView : MVPView { - fun showLoanAccounts(loanAccounts: List?) - fun showSavingsAccounts(savingAccounts: List?) - fun showShareAccounts(shareAccounts: List?) - fun showError(errorMessage: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/AddGuarantorView.kt b/app/src/main/java/org/mifos/mobile/ui/views/AddGuarantorView.kt deleted file mode 100644 index ae2e97f63..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/AddGuarantorView.kt +++ /dev/null @@ -1,15 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.guarantor.GuarantorApplicationPayload -import org.mifos.mobile.models.guarantor.GuarantorTemplatePayload -import org.mifos.mobile.ui.views.base.MVPView - -/* -* Created by saksham on 23/July/2018 -*/ interface AddGuarantorView : MVPView { - fun updatedSuccessfully(message: String?) - fun submittedSuccessfully(message: String?, payload: GuarantorApplicationPayload?) - fun showGuarantorUpdation(template: GuarantorTemplatePayload?) - fun showGuarantorApplication(template: GuarantorTemplatePayload?) - fun showError(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/BeneficiariesView.kt b/app/src/main/java/org/mifos/mobile/ui/views/BeneficiariesView.kt deleted file mode 100644 index daa61efe4..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/BeneficiariesView.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.beneficiary.Beneficiary -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 14/6/17. - */ -interface BeneficiariesView : MVPView { - fun showUserInterface() - fun showError(msg: String?) - fun showBeneficiaryList(beneficiaryList: List?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/BeneficiaryApplicationView.kt b/app/src/main/java/org/mifos/mobile/ui/views/BeneficiaryApplicationView.kt deleted file mode 100644 index a635f1e6c..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/BeneficiaryApplicationView.kt +++ /dev/null @@ -1,16 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.templates.beneficiary.BeneficiaryTemplate -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 16/6/17. - */ -interface BeneficiaryApplicationView : MVPView { - fun showUserInterface() - fun showBeneficiaryTemplate(beneficiaryTemplate: BeneficiaryTemplate?) - fun showBeneficiaryCreatedSuccessfully() - fun showBeneficiaryUpdatedSuccessfully() - fun showError(msg: String?) - fun setVisibility(state: Int) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/BeneficiaryDetailView.kt b/app/src/main/java/org/mifos/mobile/ui/views/BeneficiaryDetailView.kt deleted file mode 100644 index d30d60a85..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/BeneficiaryDetailView.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 16/6/17. - */ -interface BeneficiaryDetailView : MVPView { - fun showUserInterface() - fun showBeneficiaryDeletedSuccessfully() - fun showError(msg: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/ClientChargeView.kt b/app/src/main/java/org/mifos/mobile/ui/views/ClientChargeView.kt deleted file mode 100644 index 8707d39c4..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/ClientChargeView.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.Charge -import org.mifos.mobile.ui.views.base.MVPView - -/** - * @author Vishwajeet - * @since 17/8/16. - */ -interface ClientChargeView : MVPView { - /** - * Should be called if there is any error from client side in loading the client charges - * from server. - * Reason for error should be mentioned clearly to the user. - * - * @param message Error message to display showing reason of failure in loading - * charges of a particular client. - */ - fun showErrorFetchingClientCharges(message: String?) - - /** - * Use to display List of charges for the respective client. - * - * @param clientChargesList List containing charges of a particular client - */ - fun showClientCharges(clientChargesList: List?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/GuarantorDetailView.kt b/app/src/main/java/org/mifos/mobile/ui/views/GuarantorDetailView.kt deleted file mode 100644 index ddac8dead..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/GuarantorDetailView.kt +++ /dev/null @@ -1,10 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/* -* Created by saksham on 25/July/2018 -*/ interface GuarantorDetailView : MVPView { - fun guarantorDeletedSuccessfully(message: String?) - fun showError(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/GuarantorListView.kt b/app/src/main/java/org/mifos/mobile/ui/views/GuarantorListView.kt deleted file mode 100644 index 67aa00b52..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/GuarantorListView.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.guarantor.GuarantorPayload -import org.mifos.mobile.ui.views.base.MVPView - -/* -* Created by saksham on 24/July/2018 -*/ interface GuarantorListView : MVPView { - fun showGuarantorListSuccessfully(list: List?) - fun showError(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/HelpView.kt b/app/src/main/java/org/mifos/mobile/ui/views/HelpView.kt deleted file mode 100644 index 2ed3a441f..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/HelpView.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.FAQ -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 12/8/17. - */ -interface HelpView : MVPView { - fun showFaq(faqArrayList: ArrayList?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/HomeOldView.kt b/app/src/main/java/org/mifos/mobile/ui/views/HomeOldView.kt deleted file mode 100644 index 414c8c597..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/HomeOldView.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.mifos.mobile.ui.views - -import android.graphics.Bitmap -import org.mifos.mobile.models.client.Client -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 19/6/17. - */ -interface HomeOldView : MVPView { - fun showUserInterface() - fun showLoanAccountDetails(totalLoanAmount: Double) - fun showSavingAccountDetails(totalSavingAmount: Double) - fun showUserDetails(client: Client?) - fun showUserImage(bitmap: Bitmap?) - fun showNotificationCount(count: Int) - fun showError(errorMessage: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/HomeView.kt b/app/src/main/java/org/mifos/mobile/ui/views/HomeView.kt deleted file mode 100644 index 72041acdf..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/HomeView.kt +++ /dev/null @@ -1,16 +0,0 @@ -package org.mifos.mobile.ui.views - -import android.graphics.Bitmap -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 19/6/17. - */ -interface HomeView : MVPView { - fun showUserDetails(userName: String?) - fun showUserImageTextDrawable() - fun showUserImage(bitmap: Bitmap?) - fun showNotificationCount(count: Int) - fun showError(errorMessage: String?) - fun showUserImageNotFound() -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountWithdrawView.kt b/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountWithdrawView.kt deleted file mode 100644 index c12f04140..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountWithdrawView.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 7/6/17. - */ -interface LoanAccountWithdrawView : MVPView { - fun showLoanAccountWithdrawSuccess() - fun showLoanAccountWithdrawError(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountsDetailView.kt b/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountsDetailView.kt deleted file mode 100644 index a595f1b04..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountsDetailView.kt +++ /dev/null @@ -1,31 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.accounts.loan.LoanWithAssociations -import org.mifos.mobile.ui.views.base.MVPView - -/** - * @author Vishwajeet - * @since 19/08/16 - */ -interface LoanAccountsDetailView : MVPView { - /** - * Should be called when loan account object can successfully accessed - * from the server to display loan account details on the screen. - * - * @param loanWithAssociations object containing details of each loan account, - * received from server. - */ - fun showLoanAccountsDetail(loanWithAssociations: LoanWithAssociations?) - - /** - * Should be called if there is any error from client side in getting - * loan account object from server. - * - * - * Reason for error should be mentioned clearly to the user. - * - * @param message Error message to display showing reason of failure in getting - * loan account object - */ - fun showErrorFetchingLoanAccountsDetail(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountsTransactionView.kt b/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountsTransactionView.kt deleted file mode 100644 index 3b3d2870e..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/LoanAccountsTransactionView.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.accounts.loan.LoanWithAssociations -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 4/3/17. - */ -interface LoanAccountsTransactionView : MVPView { - fun showUserInterface() - fun showLoanTransactions(loanWithAssociations: LoanWithAssociations?) - fun showEmptyTransactions(loanWithAssociations: LoanWithAssociations?) - fun showErrorFetchingLoanAccountsDetail(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/LoanApplicationMvpView.kt b/app/src/main/java/org/mifos/mobile/ui/views/LoanApplicationMvpView.kt deleted file mode 100644 index dd92cfa76..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/LoanApplicationMvpView.kt +++ /dev/null @@ -1,16 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.templates.loans.LoanTemplate -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by Rajan Maurya on 06/03/17. - */ -interface LoanApplicationMvpView : MVPView { - fun showUserInterface() - fun showLoanTemplate(loanTemplate: LoanTemplate?) - fun showUpdateLoanTemplate(loanTemplate: LoanTemplate?) - fun showLoanTemplateByProduct(loanTemplate: LoanTemplate?) - fun showUpdateLoanTemplateByProduct(loanTemplate: LoanTemplate?) - fun showError(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/LoanRepaymentScheduleMvpView.kt b/app/src/main/java/org/mifos/mobile/ui/views/LoanRepaymentScheduleMvpView.kt deleted file mode 100644 index 21039cd63..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/LoanRepaymentScheduleMvpView.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.accounts.loan.LoanWithAssociations -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by Rajan Maurya on 03/03/17. - */ -interface LoanRepaymentScheduleMvpView : MVPView { - fun showUserInterface() - fun showLoanRepaymentSchedule(loanWithAssociations: LoanWithAssociations?) - fun showEmptyRepaymentsSchedule(loanWithAssociations: LoanWithAssociations?) - fun showError(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/LoginView.kt b/app/src/main/java/org/mifos/mobile/ui/views/LoginView.kt deleted file mode 100644 index 86d695b9e..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/LoginView.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/** - * @author Vishwajeet - * @since 05/06/16 - */ -interface LoginView : MVPView { - /** - * Should be called when the user credentials are successfully - * authenticated from the API. - */ - fun onLoginSuccess() - - /** - * Should be called when there is a problem with the user input that we - * requested or with trying to authenticate the user from the API. - * - * The error could be of many types like - * - * * Invalid Login Credentials - * * No network connection - * - * - * The problem must be communicated back to the user clearly. - * @param errorMessage Error message that tells the user about the problem. - */ - fun showMessage(errorMessage: String?) - fun showUsernameError(error: String?) - fun showPasswordError(error: String?) - fun clearUsernameError() - fun clearPasswordError() - - /** - * Should be called when the client is fetched successfully from API. - * The client's name would be passed to the view so that we can - * at least say hello! - * - * @param clientName name of the Client - */ - fun showPassCodeActivity(clientName: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/NotificationView.kt b/app/src/main/java/org/mifos/mobile/ui/views/NotificationView.kt deleted file mode 100644 index 1c598d95c..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/NotificationView.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.notification.MifosNotification -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 14/9/17. - */ -interface NotificationView : MVPView { - fun showNotifications(notifications: List?) - fun showError(msg: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/QrCodeImportView.kt b/app/src/main/java/org/mifos/mobile/ui/views/QrCodeImportView.kt deleted file mode 100644 index 93f5c4795..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/QrCodeImportView.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.mifos.mobile.ui.views - -import com.google.zxing.Result -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by manishkumar on 19/05/18. - */ -interface QrCodeImportView : MVPView { - fun showErrorReadingQr(message: String?) - fun handleDecodedResult(result: Result?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/RecentTransactionsView.kt b/app/src/main/java/org/mifos/mobile/ui/views/RecentTransactionsView.kt deleted file mode 100644 index 6cbd618a6..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/RecentTransactionsView.kt +++ /dev/null @@ -1,46 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.Transaction -import org.mifos.mobile.ui.views.base.MVPView - -/** - * @author Vishwajeet - * @since 10/08/16 - */ -interface RecentTransactionsView : MVPView { - /** - * Use to setup basic UI elements like RecyclerView and SwipeToRefresh etc. - */ - fun showUserInterface() - - /** - * Should be called if there is any error from client side in loading the recent transactions - * from server. - * Reason for error should be mentioned clearly to the user. - * - * @param message Error message to display showing reason of failure in loading recent - * transactions. - */ - fun showErrorFetchingRecentTransactions(message: String?) - - /** - * Use to display List of recent transactions for the respective client. - * - * @param transactions List containing recent transactions of a particular client - */ - fun showRecentTransactions(transactions: List?) - fun showLoadMoreRecentTransactions(transactions: List?) - fun resetUI() - fun showMessage(message: String?) - - /** - * Use to indicate user that there is no transaction to show; - */ - fun showEmptyTransaction() - - /** - * Use to show and hide the swipe Layout; - * @param show Boolean - */ - fun showSwipeRefreshLayout(show: Boolean) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/RegistrationVerificationView.kt b/app/src/main/java/org/mifos/mobile/ui/views/RegistrationVerificationView.kt deleted file mode 100644 index 93b60e6af..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/RegistrationVerificationView.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 31/7/17. - */ -interface RegistrationVerificationView : MVPView { - fun showVerifiedSuccessfully() - fun showError(msg: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/RegistrationView.kt b/app/src/main/java/org/mifos/mobile/ui/views/RegistrationView.kt deleted file mode 100644 index fd05c6724..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/RegistrationView.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 31/7/17. - */ -interface RegistrationView : MVPView { - fun showRegisteredSuccessfully() - fun showError(msg: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/SavingAccountsDetailView.kt b/app/src/main/java/org/mifos/mobile/ui/views/SavingAccountsDetailView.kt deleted file mode 100644 index bc872f15b..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/SavingAccountsDetailView.kt +++ /dev/null @@ -1,31 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.accounts.savings.SavingsWithAssociations -import org.mifos.mobile.ui.views.base.MVPView - -/** - * @author Vishwajeet - * @since 18/8/16. - */ -interface SavingAccountsDetailView : MVPView { - /** - * Should be called when saving account object can successfully accessed - * from the server to display saving account details on the screen. - * - * @param savingsWithAssociations object containing details of each saving account, - * received from server. - */ - fun showSavingAccountsDetail(savingsWithAssociations: SavingsWithAssociations?) - - /** - * Should be called if there is any error from client side in getting - * saving account object from server. - * - * Reason for error should be mentioned clearly to the user. - * - * @param message Error message to display showing reason of failure in getting - * saving account object - */ - fun showErrorFetchingSavingAccountsDetail(message: String?) - fun showAccountStatus(savingsWithAssociations: SavingsWithAssociations?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/SavingAccountsTransactionView.kt b/app/src/main/java/org/mifos/mobile/ui/views/SavingAccountsTransactionView.kt deleted file mode 100644 index 21c2dc3e6..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/SavingAccountsTransactionView.kt +++ /dev/null @@ -1,16 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.accounts.savings.SavingsWithAssociations -import org.mifos.mobile.models.accounts.savings.Transactions -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 6/3/17. - */ -interface SavingAccountsTransactionView : MVPView { - fun showUserInterface() - fun showSavingAccountsDetail(savingsWithAssociations: SavingsWithAssociations?) - fun showErrorFetchingSavingAccountsDetail(message: String?) - fun showFilteredList(list: List?) - fun showEmptyTransactions() -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/SavingsAccountApplicationView.kt b/app/src/main/java/org/mifos/mobile/ui/views/SavingsAccountApplicationView.kt deleted file mode 100644 index 4574d1cf3..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/SavingsAccountApplicationView.kt +++ /dev/null @@ -1,15 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.templates.savings.SavingsAccountTemplate -import org.mifos.mobile.ui.views.base.MVPView - -/* -* Created by saksham on 30/June/2018 -*/ interface SavingsAccountApplicationView : MVPView { - fun showUserInterfaceSavingAccountApplication(template: SavingsAccountTemplate?) - fun showSavingsAccountApplicationSuccessfully() - fun showUserInterfaceSavingAccountUpdate(template: SavingsAccountTemplate?) - fun showSavingsAccountUpdateSuccessfully() - fun showError(error: String?) - fun showMessage(showMessage: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/SavingsAccountWithdrawView.kt b/app/src/main/java/org/mifos/mobile/ui/views/SavingsAccountWithdrawView.kt deleted file mode 100644 index fa503e683..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/SavingsAccountWithdrawView.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/* -* Created by saksham on 02/July/2018 -*/ interface SavingsAccountWithdrawView : MVPView { - fun showUserInterface() - fun submitWithdrawSavingsAccount() - fun showSavingsAccountWithdrawSuccessfully() - fun showMessage(message: String?) - fun showError(error: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/SavingsMakeTransferMvpView.kt b/app/src/main/java/org/mifos/mobile/ui/views/SavingsMakeTransferMvpView.kt deleted file mode 100644 index 3697ba7ae..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/SavingsMakeTransferMvpView.kt +++ /dev/null @@ -1,16 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.templates.account.AccountOptionsTemplate -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by Rajan Maurya on 10/03/17. - */ -interface SavingsMakeTransferMvpView : MVPView { - fun showUserInterface() - fun showSavingsAccountTemplate(accountOptionsTemplate: AccountOptionsTemplate?) - fun showToaster(message: String?) - fun showError(message: String?) - fun showProgressDialog() - fun hideProgressDialog() -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/ThirdPartyTransferView.kt b/app/src/main/java/org/mifos/mobile/ui/views/ThirdPartyTransferView.kt deleted file mode 100644 index 508476975..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/ThirdPartyTransferView.kt +++ /dev/null @@ -1,16 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.models.beneficiary.Beneficiary -import org.mifos.mobile.models.templates.account.AccountOptionsTemplate -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 21/6/17. - */ -interface ThirdPartyTransferView : MVPView { - fun showUserInterface() - fun showToaster(msg: String?) - fun showThirdPartyTransferTemplate(accountOptionsTemplate: AccountOptionsTemplate?) - fun showBeneficiaryList(beneficiaries: List?) - fun showError(msg: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/TransferProcessView.kt b/app/src/main/java/org/mifos/mobile/ui/views/TransferProcessView.kt deleted file mode 100644 index 8273a9540..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/TransferProcessView.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by dilpreet on 1/7/17. - */ -interface TransferProcessView : MVPView { - fun showTransferredSuccessfully() - fun showError(msg: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/UpdatePasswordView.kt b/app/src/main/java/org/mifos/mobile/ui/views/UpdatePasswordView.kt deleted file mode 100644 index 3fdabb02a..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/UpdatePasswordView.kt +++ /dev/null @@ -1,10 +0,0 @@ -package org.mifos.mobile.ui.views - -import org.mifos.mobile.ui.views.base.MVPView - -/* -* Created by saksham on 13/July/2018 -*/ interface UpdatePasswordView : MVPView { - fun showError(message: String?) - fun showPasswordUpdatedSuccessfully() -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/UserDetailsView.kt b/app/src/main/java/org/mifos/mobile/ui/views/UserDetailsView.kt deleted file mode 100644 index e21ed34c7..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/UserDetailsView.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.mifos.mobile.ui.views - -import android.graphics.Bitmap -import org.mifos.mobile.models.client.Client -import org.mifos.mobile.ui.views.base.MVPView - -/** - * Created by naman on 07/04/17. - */ -interface UserDetailsView : MVPView { - fun showUserDetails(client: Client?) - fun showUserImage(bitmap: Bitmap?) - fun showError(message: String?) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/base/MVPView.kt b/app/src/main/java/org/mifos/mobile/ui/views/base/MVPView.kt deleted file mode 100644 index 89abe0150..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/base/MVPView.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.mifos.mobile.ui.views.base - -/** - * @author ishan - * @since 19/05/16 - */ -interface MVPView { - /** - * Should be called when a time taking process starts and we want the user - * to wait for the process to finish. The UI should gracefully display some - * sort of progress bar or animation so that the user knows that the app is - * doing some work and has not stalled. - * - * For example: a network request to the API is made for authenticating - * the user. - */ - fun showProgress() - - /** - * Should be called when a time taking process ends and we have some result - * for the user. - */ - fun hideProgress() -} diff --git a/app/src/main/java/org/mifos/mobile/ui/views/base/OnClickItem.kt b/app/src/main/java/org/mifos/mobile/ui/views/base/OnClickItem.kt deleted file mode 100644 index c0b48da01..000000000 --- a/app/src/main/java/org/mifos/mobile/ui/views/base/OnClickItem.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.mifos.mobile.ui.views.base - -import android.view.View - -/** - * Created by Rajan Maurya on 23/02/17. - */ -interface OnClickItem { - fun onItemClick(childView: View?, position: Int) - fun onItemLongPress(childView: View?, position: Int) -} diff --git a/app/src/main/java/org/mifos/mobile/ui/widgets/ChargeWidgetDataProvider.kt b/app/src/main/java/org/mifos/mobile/ui/widgets/ChargeWidgetDataProvider.kt index 09b93e39e..4aa6c7889 100644 --- a/app/src/main/java/org/mifos/mobile/ui/widgets/ChargeWidgetDataProvider.kt +++ b/app/src/main/java/org/mifos/mobile/ui/widgets/ChargeWidgetDataProvider.kt @@ -8,7 +8,6 @@ import dagger.hilt.android.qualifiers.ApplicationContext import org.mifos.mobile.R import org.mifos.mobile.models.Charge import org.mifos.mobile.repositories.ClientChargeRepository -import org.mifos.mobile.ui.views.ClientChargeView import org.mifos.mobile.viewModels.ClientChargeViewModel import java.util.concurrent.locks.ReentrantLock import javax.inject.Inject @@ -18,8 +17,7 @@ import javax.inject.Inject * providing RemoteViews to the widget in the getViewAt method. */ class ChargeWidgetDataProvider(@param:ApplicationContext private val context: Context) : - RemoteViewsFactory, - ClientChargeView { + RemoteViewsFactory { @Inject lateinit var clientChargeRepository: ClientChargeRepository @@ -82,7 +80,7 @@ class ChargeWidgetDataProvider(@param:ApplicationContext private val context: Co return false } - override fun showErrorFetchingClientCharges(message: String?) { + fun showErrorFetchingClientCharges(message: String?) { Toast.makeText( context, context.getString(R.string.error_client_charge_loading), @@ -90,16 +88,16 @@ class ChargeWidgetDataProvider(@param:ApplicationContext private val context: Co ).show() } - override fun showClientCharges(clientChargesList: List?) { + fun showClientCharges(clientChargesList: List?) { charges = clientChargesList synchronized(`object`) { condition.signal() } } - override fun showProgress() {} + fun showProgress() {} - override fun hideProgress() {} + fun hideProgress() {} override fun onDestroy() { } diff --git a/app/src/main/res/layout/fragment_about_us.xml b/app/src/main/res/layout/fragment_about_us.xml deleted file mode 100644 index 8301e94f6..000000000 --- a/app/src/main/res/layout/fragment_about_us.xml +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file