Skip to content

Commit 99d2b4b

Browse files
authored
fix confusing ui for client side embed settings (#535)
### Description this is a tiny fix to a potentially confusing "problem" that i thought of when going to sleep last night, previously if you enabled client side embeds in both unencrypted and encrypted rooms, and then turned off the main client side embeds toggle, the encrypted rooms setting would remain on, even though it would be hidden in the setting ui feel free to just close if this is stupid #### Type of change - [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Checklist: - [ ] My code follows the style guidelines of this project - [X] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [X] My changes generate no new warnings ### AI disclosure: - [ ] Partially AI assisted (clarify which code was AI assisted and briefly explain what it does). - [ ] Fully AI generated (explain what all the generated code does in moderate detail).
2 parents 64082c4 + 1dd0246 commit 99d2b4b

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
default: patch
3+
---
4+
5+
# Fix confusing ui with `Client Side Embeds in Encrypted Rooms` setting

src/app/features/room/RoomTimeline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export function RoomTimeline({
145145

146146
const showUrlPreview = room.hasEncryptionStateEvent() ? encUrlPreview : urlPreview;
147147
const showClientUrlPreview = room.hasEncryptionStateEvent()
148-
? encClientUrlPreview
148+
? clientUrlPreview && encClientUrlPreview
149149
: clientUrlPreview;
150150

151151
const nicknames = useAtomValue(nicknamesAtom);

0 commit comments

Comments
 (0)