remember the last used SIM card on a per-number basis
This commit is contained in:
parent
f5d3c2ab70
commit
cc2a4e596f
4 changed files with 33 additions and 8 deletions
|
|
@ -0,0 +1,11 @@
|
|||
package com.simplemobiletools.smsmessenger.extensions
|
||||
|
||||
inline fun <T> List<T>.indexOfFirstOrNull(predicate: (T) -> Boolean): Int? {
|
||||
var index = 0
|
||||
for (item in this) {
|
||||
if (predicate(item))
|
||||
return index
|
||||
index++
|
||||
}
|
||||
return null
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue