Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
fix: start a scan on login complete
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-audi committed Oct 2, 2023
1 parent 0f054e1 commit ad33488
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/components/sheet/sheet-add-gmail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const canSubmit = computed(
const submit = async () => {
try {
await tiki!.capture.login(form.value);
tiki!.capture.scan().catch((error) => console.error(error.toString()));
error.value = "";
form.value = { username: "", password: "", type: GMAIL };
emit("back");
Expand Down
12 changes: 3 additions & 9 deletions src/service/capture/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
CallbackError,
} from "@mytiki/capture-receipt-capacitor";
import * as TikiCaptureReceipt from "@mytiki/capture-receipt-capacitor";
import { AccountStatus } from "./account-status";
import { AccountStatus } from "@/service";

export class ServiceCapture {
readonly plugin: CaptureReceipt = TikiCaptureReceipt.instance;
Expand Down Expand Up @@ -50,10 +50,7 @@ export class ServiceCapture {
(): void => {
setTimeout(() => resolve(this.accounts), 100);
},
(error: CallbackError): void => {
console.error(error.toString());
reject(error);
},
(error: CallbackError): void => reject(error),
);
});
}
Expand Down Expand Up @@ -82,10 +79,7 @@ export class ServiceCapture {
},
7,
(): void => resolve(),
(error: CallbackError): void => {
console.error(error.toString());
reject(error);
},
(error: CallbackError): void => reject(error),
);
});
}
Expand Down

0 comments on commit ad33488

Please sign in to comment.