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