FullVCPFP: Support Speaking For Gifs
This commit is contained in:
parent
c8704a96c1
commit
d3c8366112
1 changed files with 4 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
|||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { IconUtils, UserStore } from "@webpack/common";
|
||||
import { ChannelRTCStore, IconUtils, UserStore, VoiceStateStore } from "@webpack/common";
|
||||
|
||||
import style from "./style.css?managed";
|
||||
|
||||
|
|
@ -29,7 +29,9 @@ export default definePlugin({
|
|||
if (!className.includes("tile") || !participantUserId) return;
|
||||
|
||||
const user = UserStore.getUser(participantUserId);
|
||||
const avatarUrl = IconUtils.getUserAvatarURL(user, false, 1024);
|
||||
const channelId = VoiceStateStore.getVoiceStateForUser(participantUserId)?.channelId!;
|
||||
const isSpeaking = ChannelRTCStore.getSpeakingParticipants(channelId).some(p => p.user.id === participantUserId && p.speaking);
|
||||
const avatarUrl = IconUtils.getUserAvatarURL(user, isSpeaking, 1024);
|
||||
|
||||
return {
|
||||
"--full-res-avatar": `url(${avatarUrl})`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue