[SHOPTIME-3325] 앱 삭제 후 재설치 시 과거 데이터 유지됨
수정 내용: db8로 앱 첫실행 유무 flag 추가.
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user