[6.6.0]接管记录倒序显示

This commit is contained in:
xuxinchao
2024-09-09 14:54:38 +08:00
parent 219ceef899
commit a79f25d86d

View File

@@ -162,7 +162,7 @@ class TakeOverRecordView @JvmOverloads constructor(
// takeOverListAdapter?.notifyRecordItemRemoved(removeRecord)
iterator.remove()
}
recordList = CallerTakeOverManager.getAllRecord(context)
recordList = CallerTakeOverManager.getAllRecord(context).asReversed()
ThreadUtils.runOnUiThread {
if(recordList.isNullOrEmpty()){
tvRecordNoData.visibility = View.VISIBLE
@@ -188,7 +188,7 @@ class TakeOverRecordView @JvmOverloads constructor(
*/
private fun refreshList(){
scope.launch(Dispatchers.IO){
recordList = CallerTakeOverManager.getAllRecord(context)
recordList = CallerTakeOverManager.getAllRecord(context).asReversed()
ThreadUtils.runOnUiThread {
if(recordList.isNullOrEmpty()){
tvRecordNoData.visibility = View.VISIBLE
@@ -196,7 +196,7 @@ class TakeOverRecordView @JvmOverloads constructor(
}else{
tvRecordNoData.visibility = View.GONE
recordGroup.visibility = View.VISIBLE
//更新列表
//更新列表,倒序显示
takeOverListAdapter?.setData(recordList!!)
}