appview-less bluesky client
24
fork

Configure Feed

Select the types of activity you want to include in your feed.

dont show empty space if no banner is set, revoke blob urls on post upload

dawn 0eaf2dff 1d09f64b

+17 -9
+8
src/components/PostComposer.svelte
··· 277 277 if (_state.attachedMedia?.$type === 'app.bsky.embed.video') { 278 278 const blobUrl = (_state.attachedMedia.video as AtpBlob<string>).ref.$link; 279 279 _state.blobsState.delete(blobUrl); 280 + queueMicrotask(() => URL.revokeObjectURL(blobUrl)); 280 281 } 281 282 _state.attachedMedia = undefined; 282 283 }; ··· 286 287 const imageToRemove = _state.attachedMedia.images[index]; 287 288 const blobUrl = (imageToRemove.image as AtpBlob<string>).ref.$link; 288 289 _state.blobsState.delete(blobUrl); 290 + queueMicrotask(() => URL.revokeObjectURL(blobUrl)); 289 291 290 292 const images = _state.attachedMedia.images.filter((_, i) => i !== index); 291 293 _state.attachedMedia = images.length > 0 ? { ..._state.attachedMedia, images } : undefined; ··· 303 305 _state.text = ''; 304 306 _state.quoting = undefined; 305 307 _state.replying = undefined; 308 + if (_state.attachedMedia?.$type === 'app.bsky.embed.video') 309 + URL.revokeObjectURL((_state.attachedMedia.video as AtpBlob<string>).ref.$link); 310 + else if (_state.attachedMedia?.$type === 'app.bsky.embed.images') 311 + _state.attachedMedia.images.forEach((image) => 312 + URL.revokeObjectURL((image.image as AtpBlob<string>).ref.$link) 313 + ); 306 314 _state.attachedMedia = undefined; 307 315 _state.blobsState.clear(); 308 316 unfocus();
+9 -9
src/components/ProfileView.svelte
··· 150 150 </div> 151 151 {:else} 152 152 <!-- banner --> 153 - <div class="relative h-32 w-full overflow-hidden bg-(--nucleus-fg)/5 md:h-48"> 154 - {#if bannerUrl} 153 + {#if bannerUrl} 154 + <div class="relative h-32 w-full overflow-hidden bg-(--nucleus-fg)/5 md:h-48"> 155 155 <img src={bannerUrl} alt="banner" class="h-full w-full object-cover" /> 156 - {/if} 157 - <div 158 - class="absolute inset-0 bg-linear-to-b from-transparent to-(--nucleus-bg)" 159 - style="opacity: 0.8;" 160 - ></div> 161 - </div> 156 + <div 157 + class="absolute inset-0 bg-linear-to-b from-transparent to-(--nucleus-bg)" 158 + style="opacity: 0.8;" 159 + ></div> 160 + </div> 161 + {/if} 162 162 163 163 {#if did} 164 164 <div class="px-4 pb-4"> 165 - <div class="relative z-10 -mt-12 mb-4"> 165 + <div class="relative z-10 {bannerUrl ? '-mt-12' : 'mt-4'} mb-4"> 166 166 <ProfileInfo {client} {did} bind:profile /> 167 167 </div> 168 168