Skip to content

Commit

Permalink
revert: remove force call
Browse files Browse the repository at this point in the history
  • Loading branch information
dbajpeyi committed Oct 9, 2024
1 parent 285359e commit cc23669
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 35 deletions.
11 changes: 4 additions & 7 deletions dist/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions dist/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/CredentialsImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class CredentialsImport {
}

async refresh () {
// Force refresh all settings (e.g availableInputTypes)
await this.device.settings.refresh(true)
// Refresh all settings (e.g availableInputTypes)
await this.device.settings.refresh()

// Re-decorate all inputs to show the input decorations
this.device.activeForm?.redecorateAllInputs()
Expand Down
9 changes: 4 additions & 5 deletions src/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<AvailableInputTypes>}
*/
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
}

Expand All @@ -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
Expand Down
11 changes: 4 additions & 7 deletions swift-package/Resources/assets/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions swift-package/Resources/assets/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc23669

Please sign in to comment.