notification sound

This commit is contained in:
2026-03-25 23:41:38 +01:00
parent b27656bb43
commit cc14b4d1b7
9 changed files with 168 additions and 9 deletions

View File

@@ -772,13 +772,21 @@ export class ChatPageComponent implements OnDestroy {
}
isImageEntry(entry: ChatEntry): boolean {
return entry.kind === 'file' && !!entry.downloadUrl && (entry.fileMimeType?.startsWith('image/') ?? false);
return entry.kind === 'file' && !!this.imageDisplayUrl(entry);
}
isGeneratedImageEntry(entry: ChatEntry): boolean {
return this.isImageEntry(entry) && entry.generatedByAi === true;
}
imageDisplayUrl(entry: ChatEntry): string | null {
if (entry.kind !== 'file' || !(entry.fileMimeType?.startsWith('image/') ?? false)) {
return null;
}
return entry.previewDownloadUrl ?? entry.downloadUrl ?? null;
}
isVideoEntry(entry: ChatEntry): boolean {
if (entry.kind !== 'file' || !entry.downloadUrl) {
return false;
@@ -804,6 +812,7 @@ export class ChatPageComponent implements OnDestroy {
hasDocumentPreviewImage(entry: ChatEntry): boolean {
return (
entry.kind === 'file' &&
!(entry.fileMimeType?.startsWith('image/') ?? false) &&
!!entry.previewDownloadUrl &&
(entry.previewMimeType?.startsWith('image/') ?? false)
);