Skip to content

Commit

Permalink
pretty pretty code
Browse files Browse the repository at this point in the history
  • Loading branch information
farooqkz committed Oct 8, 2023
1 parent db05bdc commit eaf1300
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/renderer/components/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Radio({
value={value}
defaultChecked={Boolean(selected)}
/>
{ icon }
{icon}
<label htmlFor={id} className={classNames(!subtitle && 'no-subtitle')}>
<span>{label}</span>
{subtitle && <span>{subtitle}</span>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function SettingsExperimentalFeatures({
const tx = window.static_translate
blobStore.load(VIDEO_CHAT_INSTANCE_AUTISTICI.replace('$ROOM', ''))
blobStore.load(VIDEO_CHAT_INSTANCE_SYSTEMLI.replace('$ROOM', ''))
function getVideoChatIcon(url: string) : any {
function getVideoChatIcon(url: string): any {
let b = blobStore.get(url.replace('$ROOM', ''))
return b ? <img src={URL.createObjectURL(b)} /> : undefined
}
Expand All @@ -50,7 +50,7 @@ export function SettingsExperimentalFeatures({
}
},
settingsStore,
getVideoChatIcon
getVideoChatIcon,
})
}

Expand Down
8 changes: 4 additions & 4 deletions src/renderer/stores/blobstore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ class BlobStore {
}

load(this: BlobStore, url: string) {
C.getHttpResponse(selectedAccountId(), url).then((response) => {
C.getHttpResponse(selectedAccountId(), url).then(response => {
this._store.set(url, new Blob(btoa(response.blob)))
});
})
}

get(this: BlobStore, url: string) : Blob | null {
get(this: BlobStore, url: string): Blob | null {
let b = this._store.get(url)
return b ? b : null
}
}

let blobStore = new BlobStore()

export default blobStore;
export default blobStore

0 comments on commit eaf1300

Please sign in to comment.