mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
perf(app): stop double-loading stream previews into the image cache (#1965)
This commit is contained in:
1 parent
022ccc794d
commit
099fb80da2
1 file changed
-2
@@ -1,7 +1,6 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
import {Endpoints} from '@app/features/app/constants/Endpoints';
|
import {Endpoints} from '@app/features/app/constants/Endpoints';
|
||||||
import * as ImageCacheUtils from '@app/features/messaging/utils/ImageCacheUtils';
|
|
||||||
import {http} from '@app/features/platform/transport/RestTransport';
|
import {http} from '@app/features/platform/transport/RestTransport';
|
||||||
import {HttpError} from '@app/features/platform/types/EndpointError';
|
import {HttpError} from '@app/features/platform/types/EndpointError';
|
||||||
import {Logger} from '@app/features/platform/utils/AppLogger';
|
import {Logger} from '@app/features/platform/utils/AppLogger';
|
||||||
@@ -185,7 +184,6 @@ function markPreviewReady(record: PreviewRecord, url: string, contentType: strin
|
|||||||
record.nextFetchAt = record.fetchedAt + STREAM_PREVIEW_REFRESH_INTERVAL_MS;
|
record.nextFetchAt = record.fetchedAt + STREAM_PREVIEW_REFRESH_INTERVAL_MS;
|
||||||
record.missingAttemptCount = 0;
|
record.missingAttemptCount = 0;
|
||||||
record.lastUsedAt = record.fetchedAt;
|
record.lastUsedAt = record.fetchedAt;
|
||||||
ImageCacheUtils.loadImage(url, () => {});
|
|
||||||
logger.debug('useStreamPreview: preview ready', {
|
logger.debug('useStreamPreview: preview ready', {
|
||||||
contentType,
|
contentType,
|
||||||
streamKey: record.streamKey,
|
streamKey: record.streamKey,
|
||||||
|
|||||||
Reference in new issue
Block a user