[SHOPTIME-3325] 앱 삭제 후 재설치 시 과거 데이터 유지됨

수정 내용: db8로 앱 첫실행 유무 flag 추가.
This commit is contained in:
hyunwoo93.cha
2025-01-13 16:03:47 +09:00
parent a6dcdd2964
commit b3e1890c9d
4 changed files with 96 additions and 2 deletions

View File

@@ -319,3 +319,55 @@ export const deleteOldDb8 = (kind, { onSuccess, onFailure, onComplete }) => {
onComplete,
});
};
export const checkFirstLaunch = ({ onSuccess, onFailure, onComplete }) => {
if (typeof window === "object" && !window.PalmSystem) {
console.log("LUNA SEND checkFirstLaunch");
onSuccess({ results: [] });
return;
}
return new LS2Request().send({
service: "luna://com.webos.service.db",
method: "find",
parameters: {
query: {
from: "com.shoptime.app.settings:1",
where: [
{
prop: "usedApp",
op: "=",
val: true,
},
],
},
},
onSuccess,
onFailure,
onComplete,
});
};
export const setFirstLaunch = ({ onSuccess, onFailure, onComplete }) => {
if (typeof window === "object" && !window.PalmSystem) {
console.log("LUNA SEND setFirstLaunch");
onSuccess();
return;
}
return new LS2Request().send({
service: "luna://com.webos.service.db",
method: "put",
parameters: {
objects: [
{
_kind: "com.shoptime.app.settings:1",
usedApp: true,
},
],
},
onSuccess,
onFailure,
onComplete,
});
};