git ssb

1+

punkmonk.termux / mvd



forked from ev / mvd

Commit 91f1dbf0c7c54a8643ec944ee3e39bc4f108d606

only show followers/followees if they are "true"

Ev Bogue committed on 6/16/2018, 3:58:32 AM
Parent: 75c3c2588ae4ea1eadb0ee1f53043712acd72941

Files changed

tools.jschanged
tools.jsView
@@ -22,12 +22,14 @@
2222 following.appendChild(h('br'))
2323
2424 sbot.friends.get({source: src}, function (err, follows) {
2525 for (var i in follows) {
26- //this needs to iterative over each object within follows and only print if TRUE
27- following.appendChild(h('a', {title: avatar.name(i).textContent, href: '#' + i}, h('span.avatar--small', avatar.image(i))))
28- count++
29- following.firstChild.textContent = 'Following: ' + count
26+ if (follows.hasOwnProperty(i)) {
27+ if (follows[i] == true)
28+ following.appendChild(h('a', {title: avatar.name(i).textContent, href: '#' + i}, h('span.avatar--small', avatar.image(i))))
29+ count++
30+ following.firstChild.textContent = 'Following: ' + count
31+ }
3032 }
3133 })
3234
3335 return following
@@ -43,11 +45,15 @@
4345 followers.appendChild(h('br'))
4446
4547 sbot.friends.get({dest: src}, function (err, follows) {
4648 for (var i in follows) {
47- followers.appendChild(h('a', {title: avatar.name(i).textContent, href: '#' + i}, h('span.avatar--small', avatar.image(i))))
48- count++
49- followers.firstChild.textContent = 'Followers: ' + count
49+ if (follows.hasOwnProperty(i)) {
50+ if (follows[i] == true) {
51+ followers.appendChild(h('a', {title: avatar.name(i).textContent, href: '#' + i}, h('span.avatar--small', avatar.image(i))))
52+ count++
53+ followers.firstChild.textContent = 'Followers: ' + count
54+ }
55+ }
5056 }
5157 })
5258
5359

Built with git-ssb-web