diff --git a/composables/users.ts b/composables/users.ts index 8c0b21bd..8ba9e820 100644 --- a/composables/users.ts +++ b/composables/users.ts @@ -187,6 +187,14 @@ export function getExpandMediaByDefault(account: mastodon.v1.AccountCredentials) return accountPreferencesMap.get(account.acct)?.['reading:expand:media'] === 'show_all' } +/** + * @param account + * @returns `true` when user selected "Auto-play animated GIFs" preference + */ +export function getAutoplayGifsByDefault(account: mastodon.v1.AccountCredentials) { + return accountPreferencesMap.get(account.acct)?.['reading:autoplay:gifs'] ?? false +} + /** * @param account * @returns `true` when user selected "Always hide media" as Media Display preference