oday
07/02/2018, 8:36 AMsearchResults.sortByDescending {
if (it.negotiated_price != null) {
100 - ((it.negotiated_price!!.toInt() / it.price) * 100)
} else {
it.price
}
}
spand
07/02/2018, 9:09 AModay
07/02/2018, 11:16 AMnwh
07/03/2018, 3:23 AM(it.negotiated_price?.toInt() ?: price) / it.price
negotiated_price
is named improperly for a variable. It should be named negotiatedPrice