Permalink
Browse files

some wee fixes

  • Loading branch information...
mmckegg committed Dec 3, 2018
1 parent 3a0c75a commit 8c9de66963f674c69cb13317a50583a37f7b8f04
Showing with 10 additions and 15 deletions.
  1. +2 −0 .vscode/settings.json
  2. +7 −13 modules/page/html/render/public.js
  3. +1 −1 modules/profile/obs/contact.js
  4. +0 −1 sbot/index.js
@@ -10,8 +10,10 @@
"paramap",
"pickr",
"realtime",
"recp",
"recps",
"spacetime",
"struct",
"ungroup"
],
"standard.autoFixOnSave": true,
@@ -199,8 +199,8 @@ exports.create = function (api) {
function noVisibleNewPostsWarning () {
const explanation = i18n('You may not be able to see new content until you follow some users or pubs.')

const shownWhen = computed([following.sync, contact.isNotFollowingAnybody],
(followingSync, isNotFollowingAnybody) => followingSync && isNotFollowingAnybody
const shownWhen = computed([contact.sync, contact.isNotFollowingAnybody],
(contactSync, isNotFollowingAnybody) => contactSync && isNotFollowingAnybody
)

return api.feed.html.followWarning(shownWhen, explanation)
@@ -212,12 +212,12 @@ exports.create = function (api) {
)

// We only show this if the user has followed someone as the first warning ('You are not following anyone')
// should be sufficient to get the user to join a pub. However, pubs have been buggy and not followed back on occassion.
// Additionally, someone onboarded on a local network might follow someone on the network, but not be followed back by
// should be sufficient to get the user to join a pub. However, pubs have been buggy and not followed back on occasion.
// Additionally, someone on-boarded on a local network might follow someone on the network, but not be followed back by
// them, so we begin to show this warning if the user has followed someone, but has no followers.
const shownWhen = computed([following.sync, followers.sync, contact.hasNoFollowers, contact.isNotFollowingAnybody],
(followingSync, followersSync, hasNoFollowers, isNotFollowingAnybody) =>
followingSync && followersSync && (hasNoFollowers && !isNotFollowingAnybody)
const shownWhen = computed([contact.sync, contact.hasNoFollowers, contact.isNotFollowingAnybody],
(contactSync, hasNoFollowers, isNotFollowingAnybody) =>
contactSync && (hasNoFollowers && !isNotFollowingAnybody)
)

return api.feed.html.followerWarning(shownWhen, explanation)
@@ -230,9 +230,3 @@ exports.create = function (api) {
}
}
}

function arrayEq (a, b) {
if (Array.isArray(a) && Array.isArray(b) && a.length === b.length && a !== b) {
return a.every((value, i) => value === b[i])
}
}
@@ -20,7 +20,7 @@ exports.create = function (api) {

var followers = api.contact.obs.followers(id)
var following = api.contact.obs.following(id)
var sync = computed([followers.sync, following.sync], (...x) => x.every(Boolean))
var sync = computed([followers.sync, following.sync, yourFollowing.sync, yourFollowers.sync], (...x) => x.every(Boolean))

var blockers = api.contact.obs.blockers(id)
var youBlock = computed(blockers, function (blockers) {
@@ -21,7 +21,6 @@ var plugins = {
contacts: require('./contacts')
}

var pull = require('pull-stream')
var ref = require('ssb-ref')

exports.name = 'patchwork'

0 comments on commit 8c9de66

Please sign in to comment.