This commit is contained in:
MathMan05 2025-04-07 13:19:10 -05:00
parent d5b860b34e
commit db1806e9a0
3 changed files with 8 additions and 3 deletions

View file

@ -1453,7 +1453,9 @@ class Channel extends SnowFlake {
this.fakeMessages = this.fakeMessages.filter((_) => _[0] !== message[0]);
message[1].remove();
for (const {url} of message[0].attachments) {
URL.revokeObjectURL(url);
try {
URL.revokeObjectURL(url);
} catch {}
}
this.fakeMessageMap.delete(id);
}

View file

@ -37,6 +37,8 @@ class File {
}
OSpoiler ||= this.filename.startsWith("SPOILER_");
const src = this.proxy_url || this.url;
this.width ||= 1000;
this.height ||= 1000;
if (this.width && this.height) {
let scale = 1;
const max = 96 * 3;
@ -67,8 +69,8 @@ class File {
img.src = src;
div.append(img);
if (this.width && !fullScreen) {
div.style.width = this.width + "px";
div.style.height = this.height + "px";
div.style.maxWidth = this.width + "px";
div.style.maxHeight = this.height + "px";
}
if (!fullScreen) {
if (OSpoiler) {

View file

@ -1106,6 +1106,7 @@ span.instanceStatus {
background: var(--blank-bg);
border-radius: 8px;
overflow: hidden;
height: 192px;
}
.messageimgdiv {
height: 100%;