mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 23:30:28 +03:00
Add call room icon (needs variations based on join rules)
This commit is contained in:
parent
a5551909c1
commit
7ce3b40037
1 changed files with 6 additions and 5 deletions
|
|
@ -256,19 +256,20 @@ export const getUnreadInfos = (mx: MatrixClient): UnreadInfo[] => {
|
||||||
export const joinRuleToIconSrc = (
|
export const joinRuleToIconSrc = (
|
||||||
icons: Record<IconName, IconSrc>,
|
icons: Record<IconName, IconSrc>,
|
||||||
joinRule: JoinRule,
|
joinRule: JoinRule,
|
||||||
space: boolean
|
space: boolean,
|
||||||
|
call: boolean
|
||||||
): IconSrc | undefined => {
|
): IconSrc | undefined => {
|
||||||
if (joinRule === JoinRule.Restricted) {
|
if (joinRule === JoinRule.Restricted) {
|
||||||
return space ? icons.Space : icons.Hash;
|
return space ? icons.Space : call ? icons.VolumeHigh : icons.Hash;
|
||||||
}
|
}
|
||||||
if (joinRule === JoinRule.Knock) {
|
if (joinRule === JoinRule.Knock) {
|
||||||
return space ? icons.SpaceLock : icons.HashLock;
|
return space ? icons.SpaceLock : call ? icons.VolumeHigh : icons.HashLock;
|
||||||
}
|
}
|
||||||
if (joinRule === JoinRule.Invite) {
|
if (joinRule === JoinRule.Invite) {
|
||||||
return space ? icons.SpaceLock : icons.HashLock;
|
return space ? icons.SpaceLock : call ? icons.VolumeHigh : icons.HashLock;
|
||||||
}
|
}
|
||||||
if (joinRule === JoinRule.Public) {
|
if (joinRule === JoinRule.Public) {
|
||||||
return space ? icons.SpaceGlobe : icons.HashGlobe;
|
return space ? icons.SpaceGlobe : call ? icons.VolumeHigh : icons.HashGlobe;
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue