From b7133ba7d5ca1ebd39a75ce8942fe98b1a0ebb05 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 28 Sep 2020 15:08:44 +0200 Subject: [PATCH] Fixed that listeners didn't get removed --- .../net/dankito/banking/ui/presenter/BankingPresenter.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt index 5784ac1a..faf8e553 100644 --- a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt +++ b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/presenter/BankingPresenter.kt @@ -891,7 +891,7 @@ open class BankingPresenter( } open fun removeBanksChangedListener(listener: (List) -> Unit): Boolean { - return banksChangedListeners.add(listener) + return banksChangedListeners.remove(listener) } protected open fun callBanksChangedListeners() { @@ -908,7 +908,7 @@ open class BankingPresenter( } open fun removeRetrievedAccountTransactionsResponseListener(listener: (GetTransactionsResponse) -> Unit): Boolean { - return retrievedAccountTransactionsResponseListeners.add(listener) + return retrievedAccountTransactionsResponseListeners.remove(listener) } protected open fun callRetrievedAccountTransactionsResponseListener(response: GetTransactionsResponse) { @@ -923,7 +923,7 @@ open class BankingPresenter( } open fun removeSelectedAccountsChangedListener(listener: (List) -> Unit): Boolean { - return selectedAccountsChangedListeners.add(listener) + return selectedAccountsChangedListeners.remove(listener) } protected open fun callSelectedAccountsChangedListeners(selectedAccounts: List) {