Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55961d5530 | ||
|
|
7c32fb3599 | ||
|
|
56971a9291 |
@@ -554,7 +554,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 27;
|
||||
CURRENT_PROJECT_VERSION = 31;
|
||||
DEVELOPMENT_TEAM = 238P3C58WC;
|
||||
ENABLE_BITCODE = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
@@ -590,7 +590,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 27;
|
||||
CURRENT_PROJECT_VERSION = 31;
|
||||
DEVELOPMENT_TEAM = 238P3C58WC;
|
||||
INFOPLIST_FILE = JellyfinAudioPlayer/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>27</string>
|
||||
<string>31</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>27</string>
|
||||
<string>31</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "JellyfinAudioPlayer",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"main": "src/index.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -7,7 +7,7 @@ interface State {
|
||||
ids: EntityId[];
|
||||
}
|
||||
|
||||
const initialState: State = {
|
||||
export const initialState: State = {
|
||||
entities: {},
|
||||
ids: [],
|
||||
};
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
import { configureStore, getDefaultMiddleware, combineReducers } from '@reduxjs/toolkit';
|
||||
import { useSelector, TypedUseSelectorHook, useDispatch } from 'react-redux';
|
||||
import AsyncStorage from '@react-native-community/async-storage';
|
||||
import { persistStore, persistReducer, PersistConfig } from 'redux-persist';
|
||||
import { persistStore, persistReducer, PersistConfig, createMigrate } from 'redux-persist';
|
||||
import autoMergeLevel2 from 'redux-persist/es/stateReconciler/autoMergeLevel2';
|
||||
|
||||
import settings from './settings';
|
||||
import music, { initialState as musicInitialState } from './music';
|
||||
import downloads, { initialState as downloadsInitialState } from './downloads';
|
||||
import { PersistState } from 'redux-persist/es/types';
|
||||
|
||||
const persistConfig: PersistConfig<AppState> = {
|
||||
key: 'root',
|
||||
storage: AsyncStorage,
|
||||
stateReconciler: autoMergeLevel2
|
||||
version: 1,
|
||||
stateReconciler: autoMergeLevel2,
|
||||
migrate: createMigrate({
|
||||
// @ts-expect-error migrations are poorly typed
|
||||
1: (state: AppState & PersistState) => {
|
||||
return {
|
||||
...state,
|
||||
settings: state.settings,
|
||||
downloads: downloadsInitialState,
|
||||
music: musicInitialState
|
||||
};
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
import settings from './settings';
|
||||
import music from './music';
|
||||
import downloads from './downloads';
|
||||
|
||||
const reducers = combineReducers({
|
||||
settings,
|
||||
music: music.reducer,
|
||||
@@ -22,11 +35,16 @@ const reducers = combineReducers({
|
||||
|
||||
const persistedReducer = persistReducer(persistConfig, reducers);
|
||||
|
||||
const middlewares = [];
|
||||
if (__DEV__) {
|
||||
middlewares.push(require('redux-flipper').default());
|
||||
}
|
||||
|
||||
const store = configureStore({
|
||||
reducer: persistedReducer,
|
||||
middleware: getDefaultMiddleware({ serializableCheck: false, immutableCheck: false }).concat(
|
||||
// logger,
|
||||
__DEV__ ? require('redux-flipper').default() : undefined,
|
||||
...middlewares,
|
||||
),
|
||||
});
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ export interface State {
|
||||
}
|
||||
}
|
||||
|
||||
const initialState: State = {
|
||||
export const initialState: State = {
|
||||
albums: {
|
||||
...albumAdapter.getInitialState(),
|
||||
isLoading: false,
|
||||
|
||||
Reference in New Issue
Block a user