From ffedb02e0734cf389ca50d0231f06cacff0d22d8 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Fri, 12 Apr 2024 00:23:27 +0900 Subject: [PATCH] feat: use `reading:autoplay:gifs` user setting --- composables/users.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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