-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
327 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/screens/Home/Views/Setting/settings/LyricDesktop/IsAutoPauseLyric.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { memo } from 'react' | ||
import { View } from 'react-native' | ||
import { useSettingValue } from '@/store/setting/hook' | ||
import { useI18n } from '@/lang' | ||
import { createStyle } from '@/utils/tools' | ||
|
||
|
||
import CheckBoxItem from '../../components/CheckBoxItem' | ||
import { toggleDesktopAutoPause } from '@/core/desktopLyric' | ||
import { updateSetting } from '@/core/common' | ||
|
||
export default memo(() => { | ||
const t = useI18n() | ||
const isAutoPause = useSettingValue('desktopLyric.isAutoPause') | ||
const setLock = (isAutoPause: boolean) => { | ||
void toggleDesktopAutoPause(isAutoPause).then(() => { | ||
updateSetting({ 'desktopLyric.isAutoPause': isAutoPause }) | ||
}) | ||
} | ||
|
||
return ( | ||
<View style={styles.content}> | ||
<CheckBoxItem check={isAutoPause} onChange={setLock} label={t('setting_lyric_desktop_auto_pause')} /> | ||
</View> | ||
) | ||
}) | ||
|
||
|
||
const styles = createStyle({ | ||
content: { | ||
marginTop: 5, | ||
}, | ||
}) |
Oops, something went wrong.