mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-05-23 22:37:41 +08:00
lint fix
This commit is contained in:
parent
a1a5752c29
commit
1f65bc64ff
76
.eslintrc.cjs
Normal file
76
.eslintrc.cjs
Normal file
@ -0,0 +1,76 @@
|
||||
|
||||
const baseRule = {
|
||||
'no-new': 'off',
|
||||
camelcase: 'off',
|
||||
'no-return-assign': 'off',
|
||||
'space-before-function-paren': ['error', 'never'],
|
||||
'no-var': 'error',
|
||||
'no-fallthrough': 'off',
|
||||
'prefer-promise-reject-errors': 'off',
|
||||
eqeqeq: 'off',
|
||||
'no-multiple-empty-lines': [1, { max: 2 }],
|
||||
'comma-dangle': [2, 'always-multiline'],
|
||||
'standard/no-callback-literal': 'off',
|
||||
'prefer-const': 'off',
|
||||
'no-labels': 'off',
|
||||
'node/no-callback-literal': 'off',
|
||||
'multiline-ternary': 'off',
|
||||
'react/display-name': 'off',
|
||||
'react/prop-types': 'off',
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: [
|
||||
'standard',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:react/jsx-runtime',
|
||||
],
|
||||
plugins: [
|
||||
'react',
|
||||
],
|
||||
rules: baseRule,
|
||||
parser: '@babel/eslint-parser',
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
extends: ['standard-with-typescript'],
|
||||
rules: {
|
||||
...baseRule,
|
||||
'@typescript-eslint/strict-boolean-expressions': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/space-before-function-paren': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/restrict-template-expressions': [
|
||||
1,
|
||||
{
|
||||
allowBoolean: true,
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
'@typescript-eslint/return-await': 'off',
|
||||
'@typescript-eslint/comma-dangle': 'off',
|
||||
'@typescript-eslint/no-dynamic-delete': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/ban-types': 'off',
|
||||
},
|
||||
parserOptions: {
|
||||
project: './tsconfig.json',
|
||||
},
|
||||
},
|
||||
],
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect', // React version. "detect" automatically picks the version you have installed.
|
||||
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
|
||||
// It will default to "latest" and warn if missing, and to "detect" in the future
|
||||
},
|
||||
},
|
||||
ignorePatterns: [
|
||||
'node_modules',
|
||||
'*.min.js',
|
||||
'test.js',
|
||||
'*Test.ts',
|
||||
],
|
||||
}
|
61
.eslintrc.js
61
.eslintrc.js
@ -1,61 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: [
|
||||
'standard-with-typescript',
|
||||
'plugin:react-hooks/recommended',
|
||||
],
|
||||
rules: {
|
||||
'no-new': 'off',
|
||||
camelcase: 'off',
|
||||
'no-return-assign': 'off',
|
||||
'space-before-function-paren': ['error', 'never'],
|
||||
'no-var': 'error',
|
||||
'no-fallthrough': 'off',
|
||||
'prefer-promise-reject-errors': 'off',
|
||||
eqeqeq: 'off',
|
||||
'no-multiple-empty-lines': [1, { max: 2 }],
|
||||
'comma-dangle': [2, 'always-multiline'],
|
||||
'standard/no-callback-literal': 'off',
|
||||
'prefer-const': 'off',
|
||||
'no-labels': 'off',
|
||||
'node/no-callback-literal': 'off',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
rules: {
|
||||
'no-new': 'off',
|
||||
camelcase: 'off',
|
||||
'no-return-assign': 'off',
|
||||
'space-before-function-paren': ['error', 'never'],
|
||||
'no-var': 'error',
|
||||
'no-fallthrough': 'off',
|
||||
'prefer-promise-reject-errors': 'off',
|
||||
eqeqeq: 'off',
|
||||
'no-multiple-empty-lines': [1, { max: 2 }],
|
||||
'comma-dangle': [2, 'always-multiline'],
|
||||
'standard/no-callback-literal': 'off',
|
||||
'prefer-const': 'off',
|
||||
'no-labels': 'off',
|
||||
'node/no-callback-literal': 'off',
|
||||
'@typescript-eslint/strict-boolean-expressions': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/space-before-function-paren': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/restrict-template-expressions': [1, {
|
||||
allowBoolean: true,
|
||||
}],
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
'@typescript-eslint/return-await': 'off',
|
||||
'multiline-ternary': 'off',
|
||||
'@typescript-eslint/comma-dangle': 'off',
|
||||
'@typescript-eslint/no-dynamic-delete': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/ban-types': 'off',
|
||||
},
|
||||
parserOptions: {
|
||||
project: './tsconfig.json',
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
561
package-lock.json
generated
561
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lx-music-mobile",
|
||||
"version": "1.1.0-beta.0",
|
||||
"version": "1.1.0-beta.1",
|
||||
"versionCode": 60,
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@ -8,8 +8,8 @@
|
||||
"ios": "react-native run-ios",
|
||||
"start": "react-native start",
|
||||
"sc": "react-native start --reset-cache",
|
||||
"test": "jest",
|
||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
||||
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
|
||||
"rd": "react-devtools",
|
||||
"menu": "adb shell input keyevent 82",
|
||||
"bundle-android": "react-native bundle --platform android --dev true --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
|
||||
@ -46,7 +46,7 @@
|
||||
"@craftzdog/react-native-buffer": "^6.0.5",
|
||||
"@react-native-async-storage/async-storage": "^1.19.2",
|
||||
"@react-native-clipboard/clipboard": "^1.11.2",
|
||||
"@react-native-community/slider": "^4.4.2",
|
||||
"@react-native-community/slider": "^4.4.3",
|
||||
"iconv-lite": "^0.6.3",
|
||||
"lrc-file-parser": "^2.4.1",
|
||||
"message2call": "^0.1.0",
|
||||
@ -65,6 +65,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.10",
|
||||
"@babel/eslint-parser": "^7.22.10",
|
||||
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
||||
"@babel/preset-env": "^7.22.10",
|
||||
"@babel/runtime": "^7.22.10",
|
||||
@ -76,7 +77,8 @@
|
||||
"@types/react-native-vector-icons": "^6.4.14",
|
||||
"babel-plugin-module-resolver": "^5.0.0",
|
||||
"changelog-parser": "^3.0.1",
|
||||
"eslint-config-standard-with-typescript": "^37.0.0",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-config-standard-with-typescript": "^38.0.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"metro-react-native-babel-preset": "0.76.8",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef, useEffect } from 'react'
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
import { View } from 'react-native'
|
||||
import Input, { type InputType } from '@/components/common/Input'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useState } from 'react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { ScrollView, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { View } from 'react-native'
|
||||
import Button from '@/components/common/Button'
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useRef, useState } from 'react'
|
||||
import Dialog, { type DialogType } from '@/components/common/Dialog'
|
||||
import { toast } from '@/utils/tools'
|
||||
import Title from './Title'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import Text from '@/components/common/Text'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import Modal, { type MusicAddModalType as ModalType, type MusicAddModalProps as ModalProps, type SelectInfo } from './MusicAddModal'
|
||||
|
||||
export interface MusicAddModalProps {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useState } from 'react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { ScrollView, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { View } from 'react-native'
|
||||
import Button from '@/components/common/Button'
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useRef, useState } from 'react'
|
||||
import Dialog, { type DialogType } from '@/components/common/Dialog'
|
||||
import { toast } from '@/utils/tools'
|
||||
import Title from './Title'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import Text from '@/components/common/Text'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import Modal, { type MusicMultiAddModalType as ModalType, type MusicMultiAddModalProps as ModalProps, type SelectInfo } from './MusicMultiAddModal'
|
||||
|
||||
export interface MusicAddModalProps {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useRef, useState, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useMemo, useRef, useState, forwardRef, useImperativeHandle } from 'react'
|
||||
import { FlatList, type FlatListProps, RefreshControl, View } from 'react-native'
|
||||
|
||||
// import { useMusicList } from '@/store/list/hook'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo, useRef } from 'react'
|
||||
import { memo, useRef } from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
// import Button from '@/components/common/Button'
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useMemo, useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useI18n } from '@/lang'
|
||||
import Menu, { type MenuType, type Position } from '@/components/common/Menu'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useState, useRef, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react'
|
||||
import { Animated, View, TouchableOpacity } from 'react-native'
|
||||
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useRef, forwardRef, useImperativeHandle } from 'react'
|
||||
import { View } from 'react-native'
|
||||
// import LoadingMask, { LoadingMaskType } from '@/components/common/LoadingMask'
|
||||
import List, { type ListProps, type ListType, type Status, type RowInfoType } from './List'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Dimensions, View, type LayoutChangeEvent } from 'react-native'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import ImageBackground from '@/components/common/ImageBackground'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, forwardRef, useImperativeHandle, type Ref } from 'react'
|
||||
import { useState, forwardRef, useImperativeHandle, type Ref } from 'react'
|
||||
import { FlatList, type FlatListProps } from 'react-native'
|
||||
|
||||
// import InsetShadow from 'react-native-inset-shadow'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useState, useCallback, useMemo, forwardRef, useImperativeHandle, type Ref } from 'react'
|
||||
import { useRef, useState, useCallback, useMemo, forwardRef, useImperativeHandle, type Ref } from 'react'
|
||||
import { StyleSheet, View, Animated } from 'react-native'
|
||||
// import PropTypes from 'prop-types'
|
||||
// import { AppColors } from '@/theme'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, type Ref, useImperativeHandle, useMemo, useState } from 'react'
|
||||
import { forwardRef, type Ref, useImperativeHandle, useMemo, useState } from 'react'
|
||||
import { View } from 'react-native'
|
||||
|
||||
import DorpDownMenu, { type DorpDownMenuProps as _DorpDownMenuProps } from '@/components/common/DorpDownMenu'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useImperativeHandle, forwardRef, useState, useEffect } from 'react'
|
||||
import { useRef, useImperativeHandle, forwardRef, useState, useEffect } from 'react'
|
||||
import ConfirmAlert, { type ConfirmAlertType } from '@/components/common/ConfirmAlert'
|
||||
import Text from '@/components/common/Text'
|
||||
import { View } from 'react-native'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo, useMemo } from 'react'
|
||||
import { memo, useMemo } from 'react'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import Text from './Text'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import React, { useMemo, useRef, useImperativeHandle, forwardRef } from 'react'
|
||||
import { useMemo, useRef, useImperativeHandle, forwardRef } from 'react'
|
||||
import { Pressable, type PressableProps, StyleSheet, type View, type ViewProps } from 'react-native'
|
||||
// import { AppColors } from '@/theme'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo } from 'react'
|
||||
import { memo } from 'react'
|
||||
|
||||
import Button, { type BtnProps } from '@/components/common/Button'
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
import CheckBox from './Checkbox'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState, useRef, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useEffect, useState, useRef, forwardRef, useImperativeHandle } from 'react'
|
||||
import { View } from 'react-native'
|
||||
import { readDir, externalStorageDirectoryPath } from '@/utils/fs'
|
||||
import { createStyle, toast } from '@/utils/tools'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo } from 'react'
|
||||
import { memo } from 'react'
|
||||
import { View, StyleSheet } from 'react-native'
|
||||
import Button from '@/components/common/Button'
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, memo, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { forwardRef, memo, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
import Input, { type InputType } from '@/components/common/Input'
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo } from 'react'
|
||||
import { memo } from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
import { Icon } from '@/components/common/Icon'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useI18n } from '@/lang'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
import React, { useMemo } from 'react'
|
||||
import { useMemo } from 'react'
|
||||
import { View, FlatList } from 'react-native'
|
||||
|
||||
import ListItem, { type PathItem } from './ListItem'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useState, useRef, forwardRef, useImperativeHandle } from 'react'
|
||||
// import { StyleSheet, View, Text, StatusBar, ScrollView } from 'react-native'
|
||||
|
||||
// import { useGetter, useDispatch } from '@/store'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { View, ScrollView } from 'react-native'
|
||||
import Dialog, { type DialogType } from './Dialog'
|
||||
import Button from './Button'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useImperativeHandle, forwardRef, useMemo, useRef } from 'react'
|
||||
import { useImperativeHandle, forwardRef, useMemo, useRef } from 'react'
|
||||
import { View, TouchableHighlight } from 'react-native'
|
||||
|
||||
import Modal, { type ModalType } from './Modal'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef } from 'react'
|
||||
import { useRef } from 'react'
|
||||
// import { View } from 'react-native'
|
||||
|
||||
import Menu, { type MenuType, type MenuProps, type Menus } from './Menu'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useMemo, useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { View, TouchableWithoutFeedback } from 'react-native'
|
||||
import { useDimensions } from '@/utils/hooks'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef, forwardRef } from 'react'
|
||||
import { useRef, forwardRef } from 'react'
|
||||
// import { View } from 'react-native'
|
||||
|
||||
import Panel, { type PanelType } from './Panel'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useCallback, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { forwardRef, useCallback, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { DrawerLayoutAndroid, type DrawerLayoutAndroidProps, View, type LayoutChangeEvent } from 'react-native'
|
||||
// import { getWindowSise } from '@/utils/tools'
|
||||
import { usePageVisible } from '@/store/common/hook'
|
||||
|
@ -9,7 +9,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import React, { forwardRef } from 'react'
|
||||
import { forwardRef } from 'react'
|
||||
import {
|
||||
View,
|
||||
StyleSheet,
|
||||
@ -22,7 +22,7 @@ import type { ImageBackgroundProps as _ImageBackgroundProps } from 'react-native
|
||||
* Very simple drop-in replacement for <Image> which supports nesting views.
|
||||
*
|
||||
* ```ReactNativeWebPlayer
|
||||
* import React, { Component } from 'react';
|
||||
* import { Component } from 'react';
|
||||
* import { AppRegistry, View, ImageBackground, Text } from 'react-native';
|
||||
*
|
||||
* class DisplayAnImageBackground extends Component {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useImperativeHandle, forwardRef, useCallback } from 'react'
|
||||
import { useRef, useImperativeHandle, forwardRef, useCallback } from 'react'
|
||||
import { TextInput, View, TouchableOpacity, StyleSheet, type TextInputProps } from 'react-native'
|
||||
import { Icon } from '@/components/common/Icon'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useCallback, useMemo, useRef, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useState, useCallback, useMemo, useRef, forwardRef, useImperativeHandle } from 'react'
|
||||
import { Animated } from 'react-native'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import { useI18n } from '@/lang'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useImperativeHandle, forwardRef, useMemo, useRef, useState, type Ref } from 'react'
|
||||
import { useImperativeHandle, forwardRef, useMemo, useRef, useState, type Ref } from 'react'
|
||||
import { View, Animated, TouchableHighlight } from 'react-native'
|
||||
import { useDimensions } from '@/utils/hooks'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// import { createStyle } from '@/utils/tools'
|
||||
import React, { useImperativeHandle, forwardRef, useState, useMemo } from 'react'
|
||||
import { useImperativeHandle, forwardRef, useState, useMemo } from 'react'
|
||||
import { Modal, TouchableWithoutFeedback, View, type ModalProps as _ModalProps } from 'react-native'
|
||||
import StatusBar from './StatusBar'
|
||||
// import { useDimensions } from '@/utils/hooks'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useMemo, useRef } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useMemo, useRef } from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
|
||||
import Modal, { type ModalType } from './Modal'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Image, StyleSheet, type ImageProps } from 'react-native'
|
||||
|
||||
export interface ScaledImageProps extends Pick<ImageProps, 'style'> {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo } from 'react'
|
||||
import { memo } from 'react'
|
||||
|
||||
import Slider, { type SliderProps as _SliderProps } from '@react-native-community/slider'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import React from 'react'
|
||||
import { StatusBar as RNStatusBar } from 'react-native'
|
||||
|
||||
const StatusBar = function() {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Text, type TextProps as _TextProps, StyleSheet } from 'react-native'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import { setSpText } from '@/utils/pixelRatio'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo, useMemo } from 'react'
|
||||
import { memo, useMemo } from 'react'
|
||||
import { View, Pressable, type GestureResponderEvent } from 'react-native'
|
||||
import { useLayout } from '@/utils/hooks'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
@ -53,7 +53,7 @@ export const exitApp = (reason: string) => {
|
||||
console.log('Handle Exit App, Reason: ' + reason)
|
||||
if (isDestroying) return
|
||||
isDestroying = true
|
||||
Promise.all([
|
||||
void Promise.all([
|
||||
hideDesktopLyric(),
|
||||
destroyPlayer(),
|
||||
hideLyric(),
|
||||
|
@ -91,7 +91,7 @@ export default () => {
|
||||
if (global.lx.isPlayedStop) return
|
||||
if (playerState.playMusicInfo.musicInfo && retryNum < 2) { // 若音频URL无效则尝试刷新2次URL
|
||||
let musicInfo = playerState.playMusicInfo.musicInfo
|
||||
getPosition().then((position) => {
|
||||
void getPosition().then((position) => {
|
||||
if (position) setNowPlayTime(position)
|
||||
}).finally(() => {
|
||||
// console.log(this.retryNum)
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { View } from 'react-native'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useState, useEffect } from 'react'
|
||||
import { useMemo, useState, useEffect } from 'react'
|
||||
import { View, ScrollView, Alert } from 'react-native'
|
||||
import { Navigation } from 'react-native-navigation'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { View, ScrollView } from 'react-native'
|
||||
|
||||
import Button from '@/components/common/Button'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native'
|
||||
import { useGetter } from '@/store'
|
||||
import { Navigation } from 'react-native-navigation'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useState, useEffect, memo } from 'react'
|
||||
import { useMemo, useState, useEffect, memo } from 'react'
|
||||
import { View, ScrollView } from 'react-native'
|
||||
|
||||
import { compareVer, sizeFormate } from '@/utils'
|
||||
|
@ -1,6 +1,5 @@
|
||||
// @flow
|
||||
|
||||
import React from 'react'
|
||||
import { Navigation } from 'react-native-navigation'
|
||||
|
||||
import {
|
||||
|
@ -166,7 +166,7 @@ let playPromise = Promise.resolve()
|
||||
let actionId = Math.random()
|
||||
export const playMusic = (musicInfo: LX.Player.PlayMusic, url: string, time: number) => {
|
||||
const id = actionId = Math.random()
|
||||
playPromise.finally(() => {
|
||||
void playPromise.finally(() => {
|
||||
if (id != actionId) return
|
||||
playPromise = handlePlayMusic(musicInfo, url, time)
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useRef } from 'react'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { filterList, getHotComment } from './utils'
|
||||
import music from '@/utils/musicSdk'
|
||||
import List, { type ListType } from './components/List'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useRef } from 'react'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { filterList, getNewComment } from './utils'
|
||||
import music from '@/utils/musicSdk'
|
||||
import List, { type ListType } from './components/List'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo, useState, useMemo, useCallback } from 'react'
|
||||
import { memo, useState, useMemo, useCallback } from 'react'
|
||||
import { View, Image } from 'react-native'
|
||||
import { BorderWidths } from '@/theme'
|
||||
import { Icon } from '@/components/common/Icon'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo } from 'react'
|
||||
import { memo } from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
|
||||
import { Icon } from '@/components/common/Icon'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useRef, useState, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useMemo, useRef, useState, forwardRef, useImperativeHandle } from 'react'
|
||||
import { FlatList, type FlatListProps, RefreshControl, View } from 'react-native'
|
||||
|
||||
// import { useMusicList } from '@/store/list/hook'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo, useMemo, useEffect, useRef, useState, useCallback } from 'react'
|
||||
import { memo, useMemo, useEffect, useRef, useState, useCallback } from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
import PagerView, { type PagerViewOnPageSelectedEvent } from 'react-native-pager-view'
|
||||
import Header from './components/Header'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo } from 'react'
|
||||
import { memo } from 'react'
|
||||
import { ScrollView, StatusBar, TouchableOpacity, View } from 'react-native'
|
||||
import { useNavActiveId } from '@/store/common/hook'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { View } from 'react-native'
|
||||
// import Button from '@/components/common/Button'
|
||||
// import { navigations } from '@/navigation'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useMemo, useState } from 'react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { InteractionManager } from 'react-native'
|
||||
import Search from '../Views/Search'
|
||||
import SongList from '../Views/SongList'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { View } from 'react-native'
|
||||
import Aside from './Aside'
|
||||
import PlayerBar from '../components/PlayerBar'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useRef } from 'react'
|
||||
import { useEffect, useRef } from 'react'
|
||||
// import { getWindowSise, onDimensionChange } from '@/utils/tools'
|
||||
import DrawerNav from './DrawerNav'
|
||||
import Header from './Header'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo } from 'react'
|
||||
import { memo } from 'react'
|
||||
import { ScrollView, StatusBar, TouchableOpacity, View } from 'react-native'
|
||||
import { useI18n } from '@/lang'
|
||||
import { useNavActiveId } from '@/store/common/hook'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
// import Button from '@/components/common/Button'
|
||||
// import { navigations } from '@/navigation'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { InteractionManager, View } from 'react-native'
|
||||
import Search from '../Views/Search'
|
||||
import SongList from '../Views/SongList'
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import Content from './Content'
|
||||
import PlayerBar from '../components/PlayerBar'
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import {
|
||||
// StyleSheet,
|
||||
View,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useState } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useState } from 'react'
|
||||
import { View, ScrollView } from 'react-native'
|
||||
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useRef } from 'react'
|
||||
import { useCallback, useRef } from 'react'
|
||||
import Text from '@/components/common/Text'
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
import Button, { type BtnType } from '@/components/common/Button'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useMemo, useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useI18n } from '@/lang'
|
||||
import Menu, { type MenuType, type Position } from '@/components/common/Menu'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import List, { type ListType, type ListProps } from './List'
|
||||
import ListMenu, { type ListMenuType, type Position } from './ListMenu'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { View } from 'react-native'
|
||||
|
||||
import SourceSelector, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useRef } from 'react'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { View } from 'react-native'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react'
|
||||
import { forwardRef, useEffect, useImperativeHandle, useRef } from 'react'
|
||||
import OnlineList, { type OnlineListType, type OnlineListProps } from '@/components/OnlineList'
|
||||
import { clearListDetail, getListDetail, setListDetail, setListDetailInfo } from '@/core/leaderboard'
|
||||
import boardState from '@/store/leaderboard/state'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useState } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useState } from 'react'
|
||||
import { TouchableOpacity } from 'react-native'
|
||||
|
||||
import { useTheme } from '@/store/theme/hook'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { StyleSheet, View, type ViewStyle } from 'react-native'
|
||||
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { View } from 'react-native'
|
||||
|
||||
// import { useGetter, useDispatch } from '@/store'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useRef } from 'react'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { View } from 'react-native'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { useDimensions } from '@/utils/hooks'
|
||||
import React from 'react'
|
||||
import Vertical from './Vertical'
|
||||
import Horizontal from './Horizontal'
|
||||
// import { AppColors } from '@/theme'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { forwardRef, useEffect, useImperativeHandle, useState } from 'react'
|
||||
import { forwardRef, useEffect, useImperativeHandle, useState } from 'react'
|
||||
import { TouchableOpacity } from 'react-native'
|
||||
|
||||
import { Icon } from '@/components/common/Icon'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { playList } from '@/core/player/player'
|
||||
import React, { useMemo, useRef, useState, useEffect, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useMemo, useRef, useState, useEffect, forwardRef, useImperativeHandle } from 'react'
|
||||
import { FlatList, type NativeScrollEvent, type NativeSyntheticEvent, InteractionManager, type FlatListProps } from 'react-native'
|
||||
|
||||
import listState from '@/store/list/state'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo, useRef } from 'react'
|
||||
import { memo, useRef } from 'react'
|
||||
import { View, TouchableOpacity } from 'react-native'
|
||||
import { LIST_ITEM_HEIGHT } from '@/config/constant'
|
||||
// import { BorderWidths } from '@/theme'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useMemo, useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useMemo, useRef, useImperativeHandle, forwardRef, useState } from 'react'
|
||||
import { useI18n } from '@/lang'
|
||||
import Menu, { type MenuType, type Position } from '@/components/common/Menu'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef, useImperativeHandle, forwardRef, useState, useEffect } from 'react'
|
||||
import { useRef, useImperativeHandle, forwardRef, useState, useEffect } from 'react'
|
||||
import SearchTipList, { type SearchTipListProps as _SearchTipListProps, type SearchTipListType } from '@/components/SearchTipList'
|
||||
import { debounce } from '@/utils'
|
||||
import { searchListMusic } from './listAction'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useState, useRef, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react'
|
||||
import { Animated, View, TouchableOpacity } from 'react-native'
|
||||
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react'
|
||||
import { useState, useRef, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react'
|
||||
import { Animated, View, TouchableOpacity } from 'react-native'
|
||||
|
||||
import Text from '@/components/common/Text'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useRef, useImperativeHandle, forwardRef } from 'react'
|
||||
import { useState, useRef, useImperativeHandle, forwardRef } from 'react'
|
||||
import { View } from 'react-native'
|
||||
|
||||
import ConfirmAlert, { type ConfirmAlertType } from '@/components/common/ConfirmAlert'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useRef } from 'react'
|
||||
import { useRef } from 'react'
|
||||
|
||||
import listState from '@/store/list/state'
|
||||
import ListMenu, { type ListMenuType, type Position, type SelectInfo } from './ListMenu'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { memo, useEffect, useRef } from 'react'
|
||||
import { memo, useEffect, useRef } from 'react'
|
||||
import { View, TouchableOpacity, FlatList, InteractionManager, type NativeScrollEvent, type NativeSyntheticEvent, type FlatListProps } from 'react-native'
|
||||
|
||||
import { Icon } from '@/components/common/Icon'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import ChoosePath, { type ChoosePathType } from '@/components/common/ChoosePath'
|
||||
import { LXM_FILE_EXT_RXP } from '@/config/constant'
|
||||
import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { forwardRef, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { handleExport, handleImport } from './listAction'
|
||||
|
||||
export interface SelectInfo {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user