1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-14 21:09:58 +00:00

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'
}
/**
* @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