Moved MainWindowPresenter to BankingUiCommon
This commit is contained in:
parent
2f2a34fedf
commit
342c8b78e8
|
@ -5,11 +5,12 @@ import net.dankito.banking.ui.model.tan.EnterTanGeneratorAtcResult
|
|||
import net.dankito.banking.ui.model.tan.EnterTanResult
|
||||
import net.dankito.banking.ui.model.tan.TanChallenge
|
||||
import net.dankito.banking.ui.model.tan.TanGeneratorTanMedium
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
|
||||
|
||||
interface IRouter {
|
||||
|
||||
fun getTanFromUserOffUiThread(account: Account, tanChallenge: TanChallenge): EnterTanResult
|
||||
fun getTanFromUserOffUiThread(account: Account, tanChallenge: TanChallenge, presenter: MainWindowPresenter): EnterTanResult
|
||||
|
||||
fun getAtcFromUserOffUiThread(tanMedium: TanGeneratorTanMedium): EnterTanGeneratorAtcResult
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package net.dankito.banking.fints4java.android.ui
|
||||
package net.dankito.banking.ui.presenter
|
||||
|
||||
import net.dankito.banking.ui.BankingClientCallback
|
||||
import net.dankito.banking.ui.IBankingClient
|
||||
|
@ -52,7 +52,7 @@ open class MainWindowPresenter(
|
|||
protected val callback: BankingClientCallback = object : BankingClientCallback {
|
||||
|
||||
override fun enterTan(account: Account, tanChallenge: TanChallenge): EnterTanResult {
|
||||
return router.getTanFromUserOffUiThread(account, tanChallenge)
|
||||
return router.getTanFromUserOffUiThread(account, tanChallenge, this@MainWindowPresenter)
|
||||
}
|
||||
|
||||
override fun enterTanGeneratorAtc(tanMedium: TanGeneratorTanMedium): EnterTanGeneratorAtcResult {
|
|
@ -9,19 +9,12 @@ import android.view.Menu
|
|||
import androidx.navigation.findNavController
|
||||
import com.github.clans.fab.FloatingActionMenu
|
||||
import kotlinx.android.synthetic.main.action_view_account_menu_item.view.*
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.dialogs.AddAccountDialog
|
||||
import net.dankito.banking.fints4java.android.ui.views.MainActivityFloatingActionMenuButton
|
||||
import net.dankito.banking.fints4java.android.util.Base64ServiceAndroid
|
||||
import net.dankito.banking.fints4javaBankingClientCreator
|
||||
import net.dankito.banking.ui.BankingClientCallback
|
||||
import net.dankito.banking.ui.model.Account
|
||||
import net.dankito.banking.ui.model.tan.EnterTanGeneratorAtcResult
|
||||
import net.dankito.banking.ui.model.tan.EnterTanResult
|
||||
import net.dankito.banking.ui.model.tan.TanChallenge
|
||||
import net.dankito.banking.ui.model.tan.TanGeneratorTanMedium
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package net.dankito.banking.fints4java.android
|
||||
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.dialogs.EnterAtcDialog
|
||||
import net.dankito.banking.fints4java.android.ui.dialogs.EnterTanDialog
|
||||
import net.dankito.banking.ui.IRouter
|
||||
|
@ -10,13 +9,14 @@ import net.dankito.banking.ui.model.tan.EnterTanGeneratorAtcResult
|
|||
import net.dankito.banking.ui.model.tan.EnterTanResult
|
||||
import net.dankito.banking.ui.model.tan.TanChallenge
|
||||
import net.dankito.banking.ui.model.tan.TanGeneratorTanMedium
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
|
||||
open class RouterAndroid(protected val activity: AppCompatActivity, protected val presenter: MainWindowPresenter) : IRouter {
|
||||
open class RouterAndroid(protected val activity: AppCompatActivity) : IRouter {
|
||||
|
||||
override fun getTanFromUserOffUiThread(account: Account, tanChallenge: TanChallenge): EnterTanResult {
|
||||
override fun getTanFromUserOffUiThread(account: Account, tanChallenge: TanChallenge, presenter: MainWindowPresenter): EnterTanResult {
|
||||
val enteredTan = AtomicReference<EnterTanResult>(null)
|
||||
val tanEnteredLatch = CountDownLatch(1)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.widget.Filter
|
|||
import android.widget.Filterable
|
||||
import kotlinx.android.synthetic.main.list_item_bank_info.view.*
|
||||
import net.dankito.banking.fints4java.android.R
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.adapter.filter.BankInfoFilter
|
||||
import net.dankito.fints.model.BankInfo
|
||||
import net.dankito.utils.android.extensions.setTintColor
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.dankito.banking.fints4java.android.ui.adapter.filter
|
||||
|
||||
import android.widget.Filter
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
import net.dankito.fints.model.BankInfo
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import android.widget.TextView
|
|||
import kotlinx.android.synthetic.main.dialog_add_account.*
|
||||
import kotlinx.android.synthetic.main.dialog_add_account.view.*
|
||||
import net.dankito.banking.fints4java.android.R
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.adapter.BankListAdapter
|
||||
import net.dankito.banking.ui.model.responses.AddAccountResponse
|
||||
import net.dankito.fints.model.BankInfo
|
||||
|
|
|
@ -15,7 +15,7 @@ import android.widget.Spinner
|
|||
import kotlinx.android.synthetic.main.dialog_enter_tan.view.*
|
||||
import kotlinx.android.synthetic.main.view_tan_image.view.*
|
||||
import net.dankito.banking.fints4java.android.R
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.adapter.TanMediumAdapter
|
||||
import net.dankito.banking.fints4java.android.ui.adapter.TanProceduresAdapter
|
||||
import net.dankito.banking.fints4java.android.ui.listener.ListItemSelectedListener
|
||||
|
|
|
@ -12,7 +12,7 @@ import android.view.ViewGroup
|
|||
import kotlinx.android.synthetic.main.dialog_transfer_money.*
|
||||
import kotlinx.android.synthetic.main.dialog_transfer_money.view.*
|
||||
import net.dankito.banking.fints4java.android.R
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.adapter.BankAccountsAdapter
|
||||
import net.dankito.banking.fints4java.android.ui.listener.ListItemSelectedListener
|
||||
import net.dankito.banking.ui.model.BankAccount
|
||||
|
|
|
@ -15,7 +15,7 @@ import android.view.inputmethod.EditorInfo
|
|||
import android.widget.EditText
|
||||
import net.dankito.banking.fints4java.android.MainActivity
|
||||
import net.dankito.banking.fints4java.android.R
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.adapter.AccountTransactionAdapter
|
||||
import net.dankito.banking.fints4java.android.ui.dialogs.TransferMoneyDialog
|
||||
import net.dankito.banking.ui.model.AccountTransaction
|
||||
|
|
|
@ -3,7 +3,7 @@ package net.dankito.banking.fints4java.android.ui.views
|
|||
import android.support.v7.app.AppCompatActivity
|
||||
import com.github.clans.fab.FloatingActionMenu
|
||||
import kotlinx.android.synthetic.main.view_floating_action_button_main.view.*
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.ui.presenter.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.dialogs.AddAccountDialog
|
||||
import net.dankito.banking.fints4java.android.ui.dialogs.TransferMoneyDialog
|
||||
|
||||
|
|
Loading…
Reference in New Issue