1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-23 14:46:08 +09: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