mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-09 19:10:51 +00:00
修复:转发规则自定义发送通道顺序失效(将List<T>
按照instr
的顺序排序) #422
This commit is contained in:
parent
da30f0dda2
commit
09d3e3f785
@ -34,8 +34,7 @@ class FrpcRepository(private val frpcDao: FrpcDao) {
|
||||
fun getByUids(uids: List<String>, instr: String): List<Frpc> {
|
||||
val frpcs = frpcDao.getByUids(uids)
|
||||
// 将结果按照 instr() 的顺序进行排序
|
||||
frpcs.sortedBy { instr.indexOf(it.uid) }
|
||||
return frpcs
|
||||
return frpcs.sortedBy { instr.indexOf(it.uid) }
|
||||
}
|
||||
|
||||
}
|
@ -33,8 +33,7 @@ class SenderRepository(private val senderDao: SenderDao) {
|
||||
fun getByIds(ids: List<Long>, instr: String): List<Sender> {
|
||||
val senders = senderDao.getByIds(ids)
|
||||
// 将结果按照 instr() 的顺序进行排序
|
||||
senders.sortedBy { instr.indexOf(it.id.toString()) }
|
||||
return senders
|
||||
return senders.sortedBy { instr.indexOf(it.id.toString()) }
|
||||
}
|
||||
|
||||
fun getAllNonCache(): List<Sender> {
|
||||
|
Loading…
Reference in New Issue
Block a user