git ssb

16+

Dominic / patchbay



Commit 47f9ac92e1cabfef73b71fea878e805a70994e87

fold in matts review changes

mix irving committed on 4/3/2017, 8:53:49 AM
Parent: 704d8cb70ad1294f388f5fb5149659597e439c45

Files changed

about/async/suggest.jschanged
about/async/suggest.jsView
@@ -1,6 +1,6 @@
11 var nest = require('depnest')
2-var { Struct, map, concat, dictToCollection, computed, watch } = require('mutant')
2 +var { Struct, map, concat, dictToCollection, computed, lookup, watch } = require('mutant')
33
44 exports.gives = nest('about.async.suggest')
55
66 exports.needs = nest({
@@ -54,20 +54,14 @@
5454 suggestion,
5555 {idle: true}
5656 )
5757
58- const suggestionsRecord = computed(contacts, contacts => {
59- var result = {}
60- contacts.forEach(contact => {
61- result[contact] = api.about.obs.names(contact)
62- })
63-
64- return result
58 + const suggestionsRecord = lookup(contacts, contact => {
59 + return [contact, api.about.obs.names(contact)]
6560 })
6661
67- const mapableSuggestions = dictToCollection(suggestionsRecord)
6862 suggestions = concat(
69- map(mapableSuggestions, pluralSuggestions, {idle: true})
63 + map(dictToCollection(suggestionsRecord), pluralSuggestions, {idle: true})
7064 )
7165
7266 watch(recentSuggestions)
7367 watch(suggestions)

Built with git-ssb-web