Skip to content

Commit

Permalink
fix: showLog
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Feb 2, 2024
1 parent 0db0e60 commit cb7b4b4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/setting/DeveloperSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const Home = ({ navigation }: NoxComponent.NavigationProps) => {
<SettingListItem
icon={ICONS.showlog}
settingName="Log"
onPress={showLog}
onPress={() => showLog()}
settingCategory="DeveloperSettings"
/>
<SettingListItem
Expand Down
15 changes: 7 additions & 8 deletions src/services/PlaybackService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,9 @@ export async function PlaybackService() {
// another setR128Gain is in Cache.saveCacheMedia where the file is fetched, which is never a scenario here
if (event.track.url !== NULL_TRACK.url) {
// this is when song is first played.
logger.debug('[FADEIN] fading in...');
await parseSongR128gain(
event.track.song,
getAppStoreState().fadeIntervalMs,
0
);
const fadeIntervalMs = getAppStoreState().fadeIntervalMs;
logger.debug(`[FADEIN] fading in of ${fadeIntervalMs}...`);
await parseSongR128gain(event.track.song, fadeIntervalMs, 0);
}
const heartBeatReq = [event.track.song.bvid, event.track.song.id];
// HACK: what if cid needs to be resolved on the fly?
Expand Down Expand Up @@ -166,8 +163,10 @@ export async function PlaybackService() {
});

if (Platform.OS === 'android') {
TrackPlayer.addEventListener(Event.PlaybackAnimatedVolumeChanged, () => {
logger.debug('animated volume finished event triggered');
TrackPlayer.addEventListener(Event.PlaybackAnimatedVolumeChanged, e => {
logger.debug(
`animated volume finished event triggered: ${JSON.stringify(e)}`
);
getAppStoreState().animatedVolumeChangedCallback();
setState({ animatedVolumeChangedCallback: () => undefined });
});
Expand Down
4 changes: 2 additions & 2 deletions src/stores/appStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const appStore = createStore<AppStore>(set => ({
setDownloadPromiseMap: (val: NoxStorage.DownloadDict) => {
set({ downloadPromiseMap: val });
},
fadeIntervalMs: 500,
fadeIntervalSec: 0.5,
fadeIntervalMs: 0,
fadeIntervalSec: 0,
setRNTPOptions: (val: UpdateOptions) => {
set({ RNTPOptions: val });
},
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11845,7 +11845,7 @@ react-native-tab-view@^3.5.1:

"react-native-track-player@git+https://[email protected]/lovegaoshi/react-native-track-player.git#APM":
version "4.0.1"
resolved "git+https://[email protected]/lovegaoshi/react-native-track-player.git#2daba94fb05d0bedef6e4e168c9b0f8e32f531a8"
resolved "git+https://[email protected]/lovegaoshi/react-native-track-player.git#db916b1645cc96e7d90a6ebd67a4446bd81f8003"

react-native-url-polyfill@^2.0.0:
version "2.0.0"
Expand Down

0 comments on commit cb7b4b4

Please sign in to comment.