Move require alt-text to new persistence + context (#1839)
This commit is contained in:
parent
2acc88e78d
commit
3a211017d3
6 changed files with 69 additions and 25 deletions
|
|
@ -83,7 +83,6 @@ export class PreferencesModel {
|
|||
prioritizeFollowedUsers: true,
|
||||
lab_treeViewEnabled: false, // experimental
|
||||
}
|
||||
requireAltTextEnabled: boolean = false
|
||||
|
||||
// used to help with transitions from device-stored to server-stored preferences
|
||||
legacyPreferences: LegacyPreferences | undefined
|
||||
|
|
@ -111,7 +110,6 @@ export class PreferencesModel {
|
|||
contentLabels: this.contentLabels,
|
||||
savedFeeds: this.savedFeeds,
|
||||
pinnedFeeds: this.pinnedFeeds,
|
||||
requireAltTextEnabled: this.requireAltTextEnabled,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -180,13 +178,6 @@ export class PreferencesModel {
|
|||
) {
|
||||
this.pinnedFeeds = v.pinnedFeeds
|
||||
}
|
||||
// check if requiring alt text is enabled in preferences, then hydrate
|
||||
if (
|
||||
hasProp(v, 'requireAltTextEnabled') &&
|
||||
typeof v.requireAltTextEnabled === 'boolean'
|
||||
) {
|
||||
this.requireAltTextEnabled = v.requireAltTextEnabled
|
||||
}
|
||||
// grab legacy values
|
||||
this.legacyPreferences = getLegacyPreferences(v)
|
||||
}
|
||||
|
|
@ -608,10 +599,6 @@ export class PreferencesModel {
|
|||
}
|
||||
}
|
||||
|
||||
toggleRequireAltTextEnabled() {
|
||||
this.requireAltTextEnabled = !this.requireAltTextEnabled
|
||||
}
|
||||
|
||||
setPrimaryLanguage(lang: string) {
|
||||
this.primaryLanguage = lang
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue