Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit ae29bd7

Browse files
Merge pull request #1357 from black-puppydog/master
Version bumps take 2
2 parents da2e086 + 3203a41 commit ae29bd7

File tree

19 files changed

+1563
-946
lines changed

19 files changed

+1563
-946
lines changed

lib/depject/app/sync/external-handler/git.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ exports.create = () => {
2727
}
2828

2929
function portInUse (port, cb) {
30-
/* eslint-disable standard/no-callback-literal */
3130
// super hacky check!
3231
const server = net.createServer(function () {})
3332
server.listen(port, '127.0.0.1')
3433
server.on('error', function () {
35-
cb(true)
34+
cb(true) // eslint-disable-line node/no-callback-literal
3635
})
3736
server.on('listening', function () {
3837
server.close()
39-
cb(false)
38+
cb(false) // eslint-disable-line node/no-callback-literal
4039
})
4140
}

lib/depject/feed/html/rollup.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,11 @@ exports.create = function (api) {
209209
abortable,
210210
pull.filter(item => {
211211
// don't show the same threads again (repeats due to pull-resume)
212-
if (!seen.has(item.key)) {
213-
seen.add(item.key)
214-
return true
212+
if (seen.has(item.key)) {
213+
return false
215214
}
215+
seen.add(item.key)
216+
return true
216217
}),
217218
pull.filter(canRenderMessage),
218219

@@ -298,15 +299,18 @@ exports.create = function (api) {
298299
}, [
299300
meta,
300301
renderedMessage,
301-
item.totalReplies > item.latestReplies.length ? h('a.full', {
302-
href: item.key,
303-
anchor: {
304-
// highlight unread messages in thread view
305-
unread: unreadBumps,
306-
// only drop to latest messages if there are more new messages not visible in thread summary
307-
anchor: hasMoreNewReplies ? unreadBumps[unreadBumps.length - 1] : null
308-
}
309-
}, [i18n('View full thread') + ' (', item.totalReplies, ')']) : null,
302+
item.totalReplies > item.latestReplies.length
303+
? h('a.full',
304+
{
305+
href: item.key,
306+
anchor: {
307+
// highlight unread messages in thread view
308+
unread: unreadBumps,
309+
// only drop to latest messages if there are more new messages not visible in thread summary
310+
anchor: hasMoreNewReplies ? unreadBumps[unreadBumps.length - 1] : null
311+
}
312+
}, [i18n('View full thread') + ' (', item.totalReplies, ')'])
313+
: null,
310314
h('div.replies', [
311315
item.latestReplies.map(msg => {
312316
const result = api.message.html.render(msg, {

lib/depject/message/html/actions.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@ exports.create = (api) => {
4646
})
4747

4848
function publishLike (msg, status = true) {
49-
const like = status ? {
50-
type: 'vote',
51-
channel: msg.value.content.channel,
52-
vote: { link: msg.key, value: 1, expression: 'Like' }
53-
} : {
54-
type: 'vote',
55-
channel: msg.value.content.channel,
56-
vote: { link: msg.key, value: 0, expression: 'Unlike' }
57-
}
49+
const like = status
50+
? {
51+
type: 'vote',
52+
channel: msg.value.content.channel,
53+
vote: { link: msg.key, value: 1, expression: 'Like' }
54+
}
55+
: {
56+
type: 'vote',
57+
channel: msg.value.content.channel,
58+
vote: { link: msg.key, value: 0, expression: 'Unlike' }
59+
}
5860
if (msg.value.content.recps) {
5961
like.recps = msg.value.content.recps.map(function (e) {
6062
return e && typeof e !== 'string' ? e.link : e

lib/depject/message/html/layout/default.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ exports.create = function (api) {
9090
messageHeader(msg, { replyInfo, priority }),
9191
cw
9292
? h('a.contentWarning',
93-
{
94-
href: '#',
95-
'ev-click': toggleAndTrack(expanded)
96-
},
97-
cw
98-
)
93+
{
94+
href: '#',
95+
'ev-click': toggleAndTrack(expanded)
96+
},
97+
cw
98+
)
9999
: undefined,
100100
h('section.content', {
101101
classList: [when(expanded, '-expanded')],

lib/depject/message/html/render/gathering.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ exports.create = function (api) {
3838
const suppliedGathering = msg.gathering || {}
3939

4040
// allow override of resolved about messages for preview in modules/gathering/sheet/edit.js
41-
const about = msg.key ? extend({
42-
hidden: api.about.obs.valueFrom(msg.key, 'hidden', yourId),
43-
image: suppliedGathering.image || api.about.obs.latestValue(msg.key, 'image'),
44-
title: suppliedGathering.title || api.about.obs.latestValue(msg.key, 'title'),
45-
description: suppliedGathering.description || api.about.obs.latestValue(msg.key, 'description'),
46-
location: suppliedGathering.location || api.about.obs.latestValue(msg.key, 'location'),
47-
startDateTime: suppliedGathering.startDateTime || api.about.obs.latestValue(msg.key, 'startDateTime')
48-
}, msg.previewAbout) : msg.previewAbout
41+
const about = msg.key
42+
? extend({
43+
hidden: api.about.obs.valueFrom(msg.key, 'hidden', yourId),
44+
image: suppliedGathering.image || api.about.obs.latestValue(msg.key, 'image'),
45+
title: suppliedGathering.title || api.about.obs.latestValue(msg.key, 'title'),
46+
description: suppliedGathering.description || api.about.obs.latestValue(msg.key, 'description'),
47+
location: suppliedGathering.location || api.about.obs.latestValue(msg.key, 'location'),
48+
startDateTime: suppliedGathering.startDateTime || api.about.obs.latestValue(msg.key, 'startDateTime')
49+
}, msg.previewAbout)
50+
: msg.previewAbout
4951

5052
const attendees = msg.key ? computed([api.about.obs.socialValues(msg.key, 'attendee')], getAttendees) : []
5153
const disableActions = !!msg.previewAbout

lib/depject/message/sheet/preview.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ exports.create = function (api) {
6161
),
6262
when(isPrivate,
6363
h('div.info -private', [
64-
recps.length ? when(!exists && isRoot,
65-
plural('Only visible to you and %s people that have been mentioned', recps.length),
66-
plural('Only visible to you and %s other thread participants', recps.length)
67-
) : i18n('This message will only be visible to you')
64+
recps.length
65+
? when(!exists && isRoot,
66+
plural('Only visible to you and %s people that have been mentioned', recps.length),
67+
plural('Only visible to you and %s other thread participants', recps.length)
68+
)
69+
: i18n('This message will only be visible to you')
6870
]),
6971
h('div.info -public', [
7072
when(msg.publiclyEditable,

lib/depject/page/html/render/message.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ function normalizedRecps (recps) {
343343
if (typeof recp === 'object') {
344344
return recp.link
345345
}
346+
return null
346347
})
347348
}
348349

lib/depject/page/html/render/profile.js

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,14 @@ exports.create = function (api) {
110110
item.key
111111
])
112112
}),
113-
isYou ? null : h('a -add', {
114-
'ev-click': () => {
115-
rename(id)
116-
},
117-
href: '#'
118-
}, ['+'])
113+
isYou
114+
? null
115+
: h('a -add', {
116+
'ev-click': () => {
117+
rename(id)
118+
},
119+
href: '#'
120+
}, ['+'])
119121
])
120122

121123
const imagePicker = h('div', { className: 'Picker' }, [
@@ -142,15 +144,17 @@ exports.create = function (api) {
142144
})
143145
])
144146
}),
145-
isYou ? null : h('span.add', [
146-
api.blob.html.input((err, file) => {
147-
if (err) return
148-
assignImage(id, file.link)
149-
}, {
150-
accept: 'image/*',
151-
resize: { width: 500, height: 500 }
152-
})
153-
])
147+
isYou
148+
? null
149+
: h('span.add', [
150+
api.blob.html.input((err, file) => {
151+
if (err) return
152+
assignImage(id, file.link)
153+
}, {
154+
accept: 'image/*',
155+
resize: { width: 500, height: 500 }
156+
})
157+
])
154158
])
155159

156160
const prepend = h('header', { className: 'ProfileHeader' }, [

lib/depject/sbot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ exports.create = function (api) {
104104
pull(
105105
sbot.conn.peers(),
106106
pull.drain(entries => {
107-
var peers = entries.filter(([, x]) => !!x.key).map(([address, data]) => ({ address, data }))
107+
const peers = entries.filter(([, x]) => !!x.key).map(([address, data]) => ({ address, data }))
108108
localPeers.set(peers.filter(peer => peer.data.type === 'lan'))
109109
connectedPeers.set(peers.filter(peer => peer.data.state === 'connected'))
110110
})
@@ -113,7 +113,7 @@ exports.create = function (api) {
113113
pull(
114114
sbot.conn.stagedPeers(),
115115
pull.drain(entries => {
116-
var peers = entries.filter(([, x]) => !!x.key).map(([address, data]) => ({ address, data }))
116+
const peers = entries.filter(([, x]) => !!x.key).map(([address, data]) => ({ address, data }))
117117
stagedPeers.set(peers)
118118
})
119119
)

lib/main-window.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,9 @@ module.exports = function (config) {
407407
]
408408
}, [
409409
name,
410-
instance ? when(instance.pendingUpdates, [
411-
' (', instance.pendingUpdates, ')'
412-
]) : null
410+
instance
411+
? when(instance.pendingUpdates, [' (', instance.pendingUpdates, ')'])
412+
: null
413413
])
414414
}
415415

0 commit comments

Comments
 (0)