diff --git a/dist/autofill-debug.js b/dist/autofill-debug.js index 765f07b7d..9859768f3 100644 --- a/dist/autofill-debug.js +++ b/dist/autofill-debug.js @@ -7672,7 +7672,7 @@ class CredentialsImport { } async refresh() { // Force refresh all settings (e.g availableInputTypes) - await this.device.settings.refresh(true); + await this.device.settings.refresh(); // Re-decorate all inputs to show the input decorations this.device.activeForm?.redecorateAllInputs(); @@ -15070,17 +15070,15 @@ class Settings { * Available Input Types are boolean indicators to represent which input types the * current **user** has data available for. * - * @param {boolean} shouldForce - if true, will always call the native app. If false, will return the cached value. * @returns {Promise} */ async getAvailableInputTypes() { - let shouldForce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; try { // This info is not needed in the topFrame, so we avoid calling the native app if (this.globalConfig.isTopFrame) { return Settings.defaults.availableInputTypes; } - if (this._availableInputTypes && !shouldForce) { + if (this._availableInputTypes) { return this.availableInputTypes; } return await this.deviceApi.request(new _deviceApiCalls.GetAvailableInputTypesCall(null)); @@ -15104,10 +15102,9 @@ class Settings { * }>} */ async refresh() { - let shouldForceAvailalbeInputTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; this.setEnabled(await this.getEnabled()); this.setFeatureToggles(await this.getFeatureToggles()); - this.setAvailableInputTypes(await this.getAvailableInputTypes(shouldForceAvailalbeInputTypes)); + this.setAvailableInputTypes(await this.getAvailableInputTypes()); this.setLanguage(await this.getLanguage()); // If 'this.enabled' is a boolean it means we were able to set it correctly and therefor respect its value diff --git a/dist/autofill.js b/dist/autofill.js index a76d44e17..6a3b66d21 100644 --- a/dist/autofill.js +++ b/dist/autofill.js @@ -3506,7 +3506,7 @@ class CredentialsImport { } async refresh() { // Force refresh all settings (e.g availableInputTypes) - await this.device.settings.refresh(true); + await this.device.settings.refresh(); // Re-decorate all inputs to show the input decorations this.device.activeForm?.redecorateAllInputs(); @@ -10904,17 +10904,15 @@ class Settings { * Available Input Types are boolean indicators to represent which input types the * current **user** has data available for. * - * @param {boolean} shouldForce - if true, will always call the native app. If false, will return the cached value. * @returns {Promise} */ async getAvailableInputTypes() { - let shouldForce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; try { // This info is not needed in the topFrame, so we avoid calling the native app if (this.globalConfig.isTopFrame) { return Settings.defaults.availableInputTypes; } - if (this._availableInputTypes && !shouldForce) { + if (this._availableInputTypes) { return this.availableInputTypes; } return await this.deviceApi.request(new _deviceApiCalls.GetAvailableInputTypesCall(null)); @@ -10938,10 +10936,9 @@ class Settings { * }>} */ async refresh() { - let shouldForceAvailalbeInputTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; this.setEnabled(await this.getEnabled()); this.setFeatureToggles(await this.getFeatureToggles()); - this.setAvailableInputTypes(await this.getAvailableInputTypes(shouldForceAvailalbeInputTypes)); + this.setAvailableInputTypes(await this.getAvailableInputTypes()); this.setLanguage(await this.getLanguage()); // If 'this.enabled' is a boolean it means we were able to set it correctly and therefor respect its value diff --git a/src/CredentialsImport.js b/src/CredentialsImport.js index 93288d83e..d086e53b8 100644 --- a/src/CredentialsImport.js +++ b/src/CredentialsImport.js @@ -38,7 +38,7 @@ class CredentialsImport { async refresh () { // Force refresh all settings (e.g availableInputTypes) - await this.device.settings.refresh(true) + await this.device.settings.refresh() // Re-decorate all inputs to show the input decorations this.device.activeForm?.redecorateAllInputs() diff --git a/src/Settings.js b/src/Settings.js index 723e448b2..ef0a2ba6d 100644 --- a/src/Settings.js +++ b/src/Settings.js @@ -151,17 +151,16 @@ export class Settings { * Available Input Types are boolean indicators to represent which input types the * current **user** has data available for. * - * @param {boolean} shouldForce - if true, will always call the native app. If false, will return the cached value. * @returns {Promise} */ - async getAvailableInputTypes (shouldForce = false) { + async getAvailableInputTypes () { try { // This info is not needed in the topFrame, so we avoid calling the native app if (this.globalConfig.isTopFrame) { return Settings.defaults.availableInputTypes } - if (this._availableInputTypes && !shouldForce) { + if (this._availableInputTypes) { return this.availableInputTypes } @@ -185,10 +184,10 @@ export class Settings { * enabled: boolean | null * }>} */ - async refresh (shouldForceAvailalbeInputTypes = false) { + async refresh () { this.setEnabled(await this.getEnabled()) this.setFeatureToggles(await this.getFeatureToggles()) - this.setAvailableInputTypes(await this.getAvailableInputTypes(shouldForceAvailalbeInputTypes)) + this.setAvailableInputTypes(await this.getAvailableInputTypes()) this.setLanguage(await this.getLanguage()) // If 'this.enabled' is a boolean it means we were able to set it correctly and therefor respect its value diff --git a/swift-package/Resources/assets/autofill-debug.js b/swift-package/Resources/assets/autofill-debug.js index 765f07b7d..9859768f3 100644 --- a/swift-package/Resources/assets/autofill-debug.js +++ b/swift-package/Resources/assets/autofill-debug.js @@ -7672,7 +7672,7 @@ class CredentialsImport { } async refresh() { // Force refresh all settings (e.g availableInputTypes) - await this.device.settings.refresh(true); + await this.device.settings.refresh(); // Re-decorate all inputs to show the input decorations this.device.activeForm?.redecorateAllInputs(); @@ -15070,17 +15070,15 @@ class Settings { * Available Input Types are boolean indicators to represent which input types the * current **user** has data available for. * - * @param {boolean} shouldForce - if true, will always call the native app. If false, will return the cached value. * @returns {Promise} */ async getAvailableInputTypes() { - let shouldForce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; try { // This info is not needed in the topFrame, so we avoid calling the native app if (this.globalConfig.isTopFrame) { return Settings.defaults.availableInputTypes; } - if (this._availableInputTypes && !shouldForce) { + if (this._availableInputTypes) { return this.availableInputTypes; } return await this.deviceApi.request(new _deviceApiCalls.GetAvailableInputTypesCall(null)); @@ -15104,10 +15102,9 @@ class Settings { * }>} */ async refresh() { - let shouldForceAvailalbeInputTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; this.setEnabled(await this.getEnabled()); this.setFeatureToggles(await this.getFeatureToggles()); - this.setAvailableInputTypes(await this.getAvailableInputTypes(shouldForceAvailalbeInputTypes)); + this.setAvailableInputTypes(await this.getAvailableInputTypes()); this.setLanguage(await this.getLanguage()); // If 'this.enabled' is a boolean it means we were able to set it correctly and therefor respect its value diff --git a/swift-package/Resources/assets/autofill.js b/swift-package/Resources/assets/autofill.js index a76d44e17..6a3b66d21 100644 --- a/swift-package/Resources/assets/autofill.js +++ b/swift-package/Resources/assets/autofill.js @@ -3506,7 +3506,7 @@ class CredentialsImport { } async refresh() { // Force refresh all settings (e.g availableInputTypes) - await this.device.settings.refresh(true); + await this.device.settings.refresh(); // Re-decorate all inputs to show the input decorations this.device.activeForm?.redecorateAllInputs(); @@ -10904,17 +10904,15 @@ class Settings { * Available Input Types are boolean indicators to represent which input types the * current **user** has data available for. * - * @param {boolean} shouldForce - if true, will always call the native app. If false, will return the cached value. * @returns {Promise} */ async getAvailableInputTypes() { - let shouldForce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; try { // This info is not needed in the topFrame, so we avoid calling the native app if (this.globalConfig.isTopFrame) { return Settings.defaults.availableInputTypes; } - if (this._availableInputTypes && !shouldForce) { + if (this._availableInputTypes) { return this.availableInputTypes; } return await this.deviceApi.request(new _deviceApiCalls.GetAvailableInputTypesCall(null)); @@ -10938,10 +10936,9 @@ class Settings { * }>} */ async refresh() { - let shouldForceAvailalbeInputTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; this.setEnabled(await this.getEnabled()); this.setFeatureToggles(await this.getFeatureToggles()); - this.setAvailableInputTypes(await this.getAvailableInputTypes(shouldForceAvailalbeInputTypes)); + this.setAvailableInputTypes(await this.getAvailableInputTypes()); this.setLanguage(await this.getLanguage()); // If 'this.enabled' is a boolean it means we were able to set it correctly and therefor respect its value