Scoop API

scoop:scoop.ui:0.1.0

src/interaction/contacts.scoop

Selected production source · src/interaction/contacts.scoop

1package scoop.ui
3import scoop.window.ContactId
5internal fun rememberContact(contacts: ArrayList<ContactId>, id: ContactId) {
6 for (current in contacts)
7 if (current == id)
8 return
9 contacts.add(id)
12internal fun forgetContact(contacts: ArrayList<ContactId>, id: ContactId) {
13 for (index in 0L ..< contacts.size)
14 if (contacts[index] == id) {
15 contacts.removeAt(index)
16 return
17 }