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

Commit 18699b1

Browse files
Refactor to remove unused function arguments
1 parent c9212ed commit 18699b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+60
-67
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function quitIfAlreadyRunning () {
3131
console.log('Please close the existing instance before starting a new one.')
3232
return electron.app.quit()
3333
}
34-
electron.app.on('second-instance', (event, commandLine, workingDirectory) => {
34+
electron.app.on('second-instance', () => {
3535
// Someone tried to run a second instance, we should focus our window.
3636
if (windows.main) {
3737
if (windows.main.isMinimized()) windows.main.restore()
@@ -116,7 +116,7 @@ electron.app.on('ready', () => {
116116
Menu.setApplicationMenu(Menu.buildFromTemplate(menu))
117117
})
118118

119-
electron.app.on('activate', function (e) {
119+
electron.app.on('activate', function () {
120120
if (windows.main) {
121121
windows.main.show()
122122
}
@@ -126,7 +126,7 @@ electron.app.on('ready', () => {
126126
quitting = true
127127
})
128128

129-
electron.ipcMain.on('open-background-devtools', function (ev, config) {
129+
electron.ipcMain.on('open-background-devtools', function () {
130130
if (windows.background) {
131131
windows.background.webContents.openDevTools({ mode: 'detach' })
132132
}

lib/depject/about/sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var nest = require('depnest')
22

33
exports.gives = nest('about.sync.shortFeedId')
44

5-
exports.create = function (api) {
5+
exports.create = function () {
66
return nest('about.sync.shortFeedId', function (id) {
77
return id.slice(1, 10)
88
})

lib/depject/about/sync/short-feed-id.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var nest = require('depnest')
22

33
exports.gives = nest('about.sync.shortFeedId')
44

5-
exports.create = function (api) {
5+
exports.create = function () {
66
return nest('about.sync.shortFeedId', function (id) {
77
return `${id.slice(0, 10)}...`
88
})

lib/depject/app/html/progress-notifier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exports.needs = nest({
1818

1919
exports.create = function (api) {
2020
const i18n = api.intl.sync.i18n
21-
return nest('app.html.progressNotifier', function (id) {
21+
return nest('app.html.progressNotifier', function () {
2222
var replicateProgress = api.progress.obs.replicate()
2323
var indexes = api.progress.obs.indexes()
2424
var migration = api.progress.obs.migration()

lib/depject/app/link-preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports.gives = nest('app.linkPreview')
1414

1515
exports.create = function (api) {
1616
var i18n = api.intl.sync.i18n
17-
return nest('app.linkPreview', function (container, delay) {
17+
return nest('app.linkPreview', function (container) {
1818
var currentHover = ObserveLinkHover(container, (value, lastValue) => {
1919
var href = value && value.getAttribute('href')
2020
var oldHref = lastValue && lastValue.getAttribute('href')

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var gitMessageTypes = [
1515
'pull-request'
1616
]
1717

18-
exports.create = (api) => {
18+
exports.create = () => {
1919
return nest('app.sync.externalHandler', function (msg) {
2020
if (!gitMessageTypes.includes(msg.value.content.type)) return
2121
return function gitHandler (id) {
@@ -29,12 +29,12 @@ exports.create = (api) => {
2929
function portInUse (port, cb) {
3030
/* eslint-disable standard/no-callback-literal */
3131
// super hacky check!
32-
var server = net.createServer(function (socket) {})
32+
var server = net.createServer(function () {})
3333
server.listen(port, '127.0.0.1')
34-
server.on('error', function (e) {
34+
server.on('error', function () {
3535
cb(true)
3636
})
37-
server.on('listening', function (e) {
37+
server.on('listening', function () {
3838
server.close()
3939
cb(false)
4040
})

lib/depject/app/views.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var nest = require('depnest')
33

44
exports.gives = nest('app.views')
55

6-
exports.create = function (api) {
6+
exports.create = function () {
77
return nest('app.views', function (renderPage, defaultViews) {
88
var views = Dict({})
99

lib/depject/channel/html/subscribe-toggle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports.needs = nest({
1111

1212
exports.create = function (api) {
1313
var i18n = api.intl.sync.i18n
14-
return nest('channel.html.subscribeToggle', function (channel, opts) {
14+
return nest('channel.html.subscribeToggle', function (channel) {
1515
var yourId = api.keys.sync.id()
1616
var subscribedChannels = api.channel.obs.subscribed(yourId)
1717

lib/depject/channel/sync/normalize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ var normalizeChannel = require('ssb-ref').normalizeChannel
33

44
exports.gives = nest('channel.sync.normalize')
55

6-
exports.create = function (api) {
6+
exports.create = function () {
77
return nest('channel.sync.normalize', normalizeChannel)
88
}

lib/depject/feed/html/rollup.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ exports.create = function (api) {
4949
hidden = false,
5050
groupSummaries = true,
5151
compactFilter = returnFalse,
52-
filterRepliesIfBlockedByRootAuthor = true,
53-
displayFilter = returnTrue,
5452
ungroupFilter = returnFalse,
5553
searchSpinner = false,
5654
updateStream
@@ -75,12 +73,12 @@ exports.create = function (api) {
7573
intersectionBindingViewport: { rootMargin: '1000px' },
7674

7775
style: { overflow: 'auto' },
78-
hooks: [(element) => {
76+
hooks: [() => {
7977
// don't activate until added to DOM
8078
refresh()
8179

8280
if (isObservable(hidden)) {
83-
unwatchHidden = hidden((hidden) => {
81+
unwatchHidden = hidden(() => {
8482
refresh()
8583
})
8684
}
@@ -356,10 +354,6 @@ function getAuthors (items) {
356354
return Object.keys(authors)
357355
}
358356

359-
function returnTrue () {
360-
return true
361-
}
362-
363357
function returnFalse () {
364358
return false
365359
}

0 commit comments

Comments
 (0)