refactor(ui): remove unused image cache system and fix TypeScript compilation

- Remove imageCache Map that only stored null values
- Remove selectedImageData Blob property (never used)
- Remove cacheImageData method and related function props
- Remove handleImageLoad method from ActivityListItem
- Clean up ImageViewer component props
- Fix TypeScript compilation by replacing legacy logConsoleAndDb calls
- Replace logConsoleAndDb with logger.error in deepLinks service
- Images continue to work via direct URL references

The image cache system was non-functional and only stored null values.
ImageViewer component ignored blob data and only used URLs.
Fixed production build failure caused by undefined logConsoleAndDb function.
Removing dead code improves maintainability without affecting functionality.
This commit is contained in:
Matthew Raymer
2025-08-12 08:45:08 +00:00
parent 2afe61d752
commit bb357f294a
4 changed files with 5 additions and 49 deletions

View File

@@ -73,7 +73,6 @@
class="w-full h-auto max-w-lg max-h-96 object-contain mx-auto drop-shadow-md"
:src="record.image"
alt="Activity image"
@load="handleImageLoad(record.image)"
/>
</a>
</div>
@@ -272,13 +271,6 @@ export default class ActivityListItem extends Vue {
@Prop() isRegistered!: boolean;
@Prop() activeDid!: string;
/**
* Function prop for handling image caching
* Called when an image loads successfully, allowing parent to control caching behavior
*/
@Prop({ type: Function, default: () => {} })
onImageCache!: (imageUrl: string) => void | Promise<void>;
isHiddenDid = isHiddenDid;
notify!: ReturnType<typeof createNotifyHelpers>;
$notify!: (notification: any, timeout?: number) => void;
@@ -295,14 +287,6 @@ export default class ActivityListItem extends Vue {
this.notify.warning(NOTIFY_UNKNOWN_PERSON.message, TIMEOUTS.STANDARD);
}
/**
* Handle image load event - call function prop for caching
* Allows parent to control caching behavior and validation
*/
handleImageLoad(imageUrl: string): void {
this.onImageCache(imageUrl);
}
get fetchAmount(): string {
const claim =
(this.record.fullClaim as any)?.claim || this.record.fullClaim;

View File

@@ -45,7 +45,6 @@ import { logger } from "../utils/logger";
@Component({ emits: ["update:isOpen"] })
export default class ImageViewer extends Vue {
@Prop() imageUrl!: string;
@Prop() imageData!: Blob | null;
@Prop() isOpen!: boolean;
userAgent = new UAParser();