Extracted getFormattedMessageLogForAccounts()

This commit is contained in:
dankito 2020-11-16 22:23:59 +01:00
parent 83e8b7b882
commit 0200a274a9
2 changed files with 5 additions and 1 deletions

View File

@ -53,7 +53,7 @@ open class SendMessageLogDialog : DialogFragment() {
}
protected open fun setupUI(rootView: View) {
val messageLog = presenter.getMessageLogForAccounts(presenter.allBanksSortedByDisplayIndex).joinToString("\r\n\r\n")
val messageLog = presenter.getFormattedMessageLogForAccounts(presenter.allBanksSortedByDisplayIndex)
if (messageLog.isBlank()) {
rootView.txtvwInfoNoMessageLogEntriesYet.show()

View File

@ -782,6 +782,10 @@ open class BankingPresenter(
}
open fun getFormattedMessageLogForAccounts(banks: List<TypedBankData>, includeFailedAccountAdditions: Boolean = true): String {
return getMessageLogForAccounts(banks, includeFailedAccountAdditions).joinToString("\r\n\r\n")
}
open fun getMessageLogForAccounts(banks: List<TypedBankData>, includeFailedAccountAdditions: Boolean = true): List<String> {
val logEntries = mutableListOf<MessageLogEntry>()