1
0

feat: use reading:autoplay:gifs user setting

This commit is contained in:
TAKAHASHI Shuuji 2024-04-12 00:23:27 +09:00
parent 706cffe209
commit ffedb02e07
No known key found for this signature in database
GPG Key ID: F15C887632129F5E

View File

@ -187,6 +187,14 @@ export function getExpandMediaByDefault(account: mastodon.v1.AccountCredentials)
return accountPreferencesMap.get(account.acct)?.['reading:expand:media'] === 'show_all' 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 * @param account
* @returns `true` when user selected "Always hide media" as Media Display preference * @returns `true` when user selected "Always hide media" as Media Display preference