Skip to content

Instantly share code, notes, and snippets.

View Synesso's full-sized avatar

Jem Mawson Synesso

View GitHub Profile
val matches = (utm.friends ::: utm.followers).map(u => NameAndScreenName(u.name, u.screenName)).filter(_.matches(searchText.text)).sort((e1, e2) => (e1 compareTo e2) < 0).removeDuplicates
(matches.length match {
case 0 => "No matches were found"
case 1 => "Select the following item to insert a @screenname"
case _ => "Select one of these " + matches.length + " items to insert a @screenname"
}) :: matches