Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Nov 27, 2024
1 parent 82ab38a commit 10f773c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/hooks/useSetupPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export default ({ intentData, vip }: NoxComponent.SetupPlayerProps) => {
const { updateVersion, checkVersion } = useVersionCheck();
const setIntentData = useNoxSetting(state => state.setIntentData);
const { checkPlayStoreUpdates } = usePlayStore();
const {} = useActiveTrack();
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _activeTrack = useActiveTrack();

useEffect(() => {
if (!vip) {
Expand Down
7 changes: 2 additions & 5 deletions src/utils/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,8 @@ export const execWhenTrue = async ({
executeFn,
wait = 50,
}: ExecWhenTrue) => {
while (true) {
if (await loopCheck()) {
executeFn();
return;
}
while (!(await loopCheck())) {
await timeout(wait);
}
executeFn();
};
6 changes: 3 additions & 3 deletions src/utils/sync/Dropbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ export const noxBackup = (

const download = async (
dbx: _Dropbox,
contentParse: (v: Blob) => Promise<ArrayBuffer>,
contentParse: (v: Blob) => Promise<Uint8Array>,
fpath = DEFAULT_FILE_PATH,
) => {
if (fpath === null) {
return null;
}
const downloadedFile = await dbx.filesDownload({ path: fpath });
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: dropbox didnt have fileBlob in their sdk anywhere but UPGRADING.md
// @ts-expect-error: dropbox didnt have fileBlob in their sdk anywhere but UPGRADING.md
const blob = await contentParse(downloadedFile.result.fileBlob);
return new Uint8Array(blob);
};
Expand All @@ -55,7 +55,7 @@ const download = async (
*/
export const noxRestore = async (
dbx: _Dropbox,
contentParse: (v: Blob) => Promise<ArrayBuffer>,
contentParse: (v: Blob) => Promise<Uint8Array>,
) => {
const noxFile = await find(dbx);
if (!noxFile) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/sync/Github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const checkAuthentication = async (token = '') => {

export const noxRestore = async (
token: string,
contentParse: (v: Blob) => Promise<ArrayBuffer>,
contentParse: (v: Blob) => Promise<Uint8Array>,
) => {
const res = await bfetch(
`https://api.github.com/repos/${await getUserName(token)}/${APM_REPO_NAME}/contents/${APM_FILE_NAME}`,
Expand Down

0 comments on commit 10f773c

Please sign in to comment.