Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
Fix #8, 자동 제출 껐을 때 제출되는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnlog committed Jan 6, 2021
1 parent 994e180 commit 1fc2d0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util/sendSurvey.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void backgroundFetchHeadlessTask(String taskId) async {
JagaJindanData dat = JagaJindanData.readFromJSON(json);

if (dat != null) {
if (taskId == SURVEY_TASK_ID) await sendSurvey(dat, true);
if (dat.autoSubmit && taskId == SURVEY_TASK_ID) await sendSurvey(dat, true);
await setBackgroundProcess(dat);
}
} catch (e) {
Expand Down Expand Up @@ -61,6 +61,7 @@ Future<void> setBackgroundProcess(JagaJindanData dat) async {

var diff = target.difference(currTime);

//TODO: Task Id에 목표 시간 넣어서 중복 제출 방지, 현재로썬 최선인듯
await BackgroundFetch.stop(SURVEY_TASK_ID);
await BackgroundFetch.scheduleTask(TaskConfig(
enableHeadless: true,
Expand Down

0 comments on commit 1fc2d0b

Please sign in to comment.