notification sound
This commit is contained in:
@@ -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)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user