Skip to content

Commit

Permalink
refactor: Remove unused client/stackClient parameters from FlagshipLink
Browse files Browse the repository at this point in the history
This replies to #1505 (comment)
  • Loading branch information
Ldoppea committed Sep 4, 2024
1 parent 88157ce commit 821bd90
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/cozy-client/src/FlagshipLink.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
import CozyLink from './CozyLink'
import logger from './logger'

export default class FlagshipLink extends CozyLink {
/**
* @param {object} [options] - Options
* @param {object} [options.stackClient] - A StackClient
* @param {object} [options.client] - A StackClient (deprecated)
* @param {import('cozy-intent').WebviewService} [options.webviewIntent] - The webview's intent reference
*/
constructor({ client, stackClient, webviewIntent } = {}) {
constructor({ webviewIntent } = {}) {
super()
if (client) {
logger.warn(
'Using options.client is deprecated, prefer options.stackClient'
)
}
this.stackClient = stackClient || client
this.webviewIntent = webviewIntent
}

registerClient(client) {
this.stackClient = client.stackClient || client.client
// does nothing, we don't need any client for this kind of link
}

reset() {
this.stackClient = null
// does nothing, we don't need any client for this kind of link
}

async request(operation, result, forward) {
Expand Down

0 comments on commit 821bd90

Please sign in to comment.