|
|
|
|
@ -10,6 +10,7 @@ import net.pokeranalytics.android.exceptions.PAIllegalStateException |
|
|
|
|
import net.pokeranalytics.android.model.interfaces.DeleteValidityStatus |
|
|
|
|
import net.pokeranalytics.android.model.interfaces.Identifiable |
|
|
|
|
import net.pokeranalytics.android.model.interfaces.NameManageable |
|
|
|
|
import net.pokeranalytics.android.model.interfaces.SaveValidityStatus |
|
|
|
|
import net.pokeranalytics.android.ui.adapter.StaticRowRepresentableDataSource |
|
|
|
|
import net.pokeranalytics.android.ui.view.Localizable |
|
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
|
@ -120,5 +121,13 @@ open class TransactionType : RealmObject(), NameManageable, StaticRowRepresentab |
|
|
|
|
return R.string.transaction_relationship_error |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun getFailedSaveMessage(status: SaveValidityStatus): Int { |
|
|
|
|
return when (status) { |
|
|
|
|
SaveValidityStatus.DATA_INVALID -> R.string.operation_type_empty_field_error |
|
|
|
|
SaveValidityStatus.ALREADY_EXISTS -> R.string.duplicate_operation_type_error |
|
|
|
|
else -> super.getFailedSaveMessage(status) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|