Show saved crops
This commit is contained in:
parent
c1f0f67656
commit
99ed1bc9af
1 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
import { openCache } from "@/next/blob-cache";
|
||||
import log from "@/next/log";
|
||||
import { Skeleton, styled } from "@mui/material";
|
||||
import { Legend } from "components/PhotoViewer/styledComponents/Legend";
|
||||
|
@ -165,12 +166,18 @@ const FaceCropImageView: React.FC<FaceCropImageViewProps> = ({
|
|||
if (faceID && electron) {
|
||||
electron
|
||||
.legacyFaceCrop(faceID)
|
||||
/*
|
||||
cachedOrNew("face-crops", cacheKey, async () => {
|
||||
.then(async (data) => {
|
||||
if (data) return data;
|
||||
/*
|
||||
TODO(MR): Also, get this to work on web too.
|
||||
cachedOrNew("face-crops", cacheKey, async () => {
|
||||
return machineLearningService.regenerateFaceCrop(
|
||||
faceId,
|
||||
);
|
||||
})*/
|
||||
})*/
|
||||
const cache = await openCache("face-crops");
|
||||
return await cache.get(faceID);
|
||||
})
|
||||
.then((data) => {
|
||||
if (data) {
|
||||
const blob = new Blob([data]);
|
||||
|
|
Loading…
Add table
Reference in a new issue