From e2d85a41e76c8cbf607b0d83471a9dba95cb97c7 Mon Sep 17 00:00:00 2001 From: "Mr. Stallion" Date: Fri, 6 Nov 2020 17:44:40 -0600 Subject: [PATCH] BOS fix --- CHANGELOG.md | 4 ++++ chat/preview/helper/character.ts | 5 +++++ chat/preview/helper/external.ts | 5 +++++ chat/preview/helper/helper.ts | 1 + chat/preview/helper/local.ts | 5 +++++ chat/preview/helper/manager.ts | 2 +- electron/package.json | 2 +- package.json | 2 +- 8 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ddf61a..fe6ea77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.4.1 +* Fixed some image previews showing up black + + ## 1.4.0 * More configurable settings for F-Chat Rising * Hover mouse over a character name to see a character preview diff --git a/chat/preview/helper/character.ts b/chat/preview/helper/character.ts index 4ba3cba..84f05b3 100644 --- a/chat/preview/helper/character.ts +++ b/chat/preview/helper/character.ts @@ -9,6 +9,11 @@ export class CharacterPreviewHelper extends ImagePreviewHelper { } + getName(): string { + return 'CharacterPreviewHelper'; + } + + show(url: string | undefined): void { this.visible = true; this.url = url; diff --git a/chat/preview/helper/external.ts b/chat/preview/helper/external.ts index 2f92663..065ac1c 100644 --- a/chat/preview/helper/external.ts +++ b/chat/preview/helper/external.ts @@ -47,6 +47,11 @@ export class ExternalImagePreviewHelper extends ImagePreviewHelper { } + getName(): string { + return 'ExternalImagePreviewHelper'; + } + + reactsToSizeUpdates(): boolean { return true; } diff --git a/chat/preview/helper/helper.ts b/chat/preview/helper/helper.ts index 66f9a24..2821670 100644 --- a/chat/preview/helper/helper.ts +++ b/chat/preview/helper/helper.ts @@ -12,6 +12,7 @@ export abstract class ImagePreviewHelper { abstract hide(): void; abstract match(domainName: string | undefined, url: string | undefined): boolean; abstract renderStyle(): Record; + abstract getName(): string; abstract reactsToSizeUpdates(): boolean; abstract setRatio(ratio: number): void; diff --git a/chat/preview/helper/local.ts b/chat/preview/helper/local.ts index e3b2622..f8de59c 100644 --- a/chat/preview/helper/local.ts +++ b/chat/preview/helper/local.ts @@ -8,6 +8,11 @@ export class LocalImagePreviewHelper extends ImagePreviewHelper { } + getName(): string { + return 'LocalImagePreviewHelper'; + } + + show(url: string | undefined): void { this.visible = true; this.url = url; diff --git a/chat/preview/helper/manager.ts b/chat/preview/helper/manager.ts index b16fd47..a1a328b 100644 --- a/chat/preview/helper/manager.ts +++ b/chat/preview/helper/manager.ts @@ -42,7 +42,7 @@ export class PreviewManager { return _.fromPairs( _.map( - this.helpers, (h) => ([h.helper.constructor.name, h.renderStyle]) + this.helpers, (h) => ([h.helper.getName(), h.renderStyle]) ) ); } diff --git a/electron/package.json b/electron/package.json index af2b589..ff97f96 100644 --- a/electron/package.json +++ b/electron/package.json @@ -1,6 +1,6 @@ { "name": "fchat", - "version": "1.4.0", + "version": "1.4.1", "author": "The F-List Team and Mister Stallion (Esq.)", "description": "F-List.net Chat Client", "main": "main.js", diff --git a/package.json b/package.json index a27d48b..56b3f46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "f-list-rising", - "version": "1.4.0", + "version": "1.4.1", "author": "The F-List Team and and Mister Stallion (Esq.)", "description": "A heavily modded F-Chat 3.0 client for F-List", "license": "MIT",