mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 17:37:40 +08: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> {
|
fun getByUids(uids: List<String>, instr: String): List<Frpc> {
|
||||||
val frpcs = frpcDao.getByUids(uids)
|
val frpcs = frpcDao.getByUids(uids)
|
||||||
// 将结果按照 instr() 的顺序进行排序
|
// 将结果按照 instr() 的顺序进行排序
|
||||||
frpcs.sortedBy { instr.indexOf(it.uid) }
|
return frpcs.sortedBy { instr.indexOf(it.uid) }
|
||||||
return frpcs
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -33,8 +33,7 @@ class SenderRepository(private val senderDao: SenderDao) {
|
|||||||
fun getByIds(ids: List<Long>, instr: String): List<Sender> {
|
fun getByIds(ids: List<Long>, instr: String): List<Sender> {
|
||||||
val senders = senderDao.getByIds(ids)
|
val senders = senderDao.getByIds(ids)
|
||||||
// 将结果按照 instr() 的顺序进行排序
|
// 将结果按照 instr() 的顺序进行排序
|
||||||
senders.sortedBy { instr.indexOf(it.id.toString()) }
|
return senders.sortedBy { instr.indexOf(it.id.toString()) }
|
||||||
return senders
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getAllNonCache(): List<Sender> {
|
fun getAllNonCache(): List<Sender> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user