Skip to content

Commit

Permalink
Update "UpdateStatus" type to server changes (#413)
Browse files Browse the repository at this point in the history
The "UpdateStatus" was updated in Suwayomi/Suwayomi-Server#657 on the server side
  • Loading branch information
schroda authored Aug 28, 2023
1 parent bde16d0 commit c23799f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/library/UpdateChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ function UpdateChecker({ handleFinishedUpdate }: IUpdateCheckerProps) {
let updateStarted = false;

wsc.onmessage = (e) => {
const { running, statusMap } = JSON.parse(e.data) as IUpdateStatus;
const { COMPLETE = [], RUNNING = [], PENDING = [] } = statusMap;
const { running, mangaStatusMap } = JSON.parse(e.data) as IUpdateStatus;
const { COMPLETE = [], RUNNING = [], PENDING = [] } = mangaStatusMap;

const currentProgress = 100 * (COMPLETE.length / (COMPLETE.length + RUNNING.length + PENDING.length));

Expand Down
2 changes: 1 addition & 1 deletion src/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export interface IQueue {

export interface IUpdateStatus {
running: boolean;
statusMap: {
mangaStatusMap: {
COMPLETE?: IManga[];
RUNNING?: IManga[];
PENDING?: IManga[];
Expand Down

0 comments on commit c23799f

Please sign in to comment.