Compare commits

...

3 Commits

Author SHA1 Message Date
Lei Nelissen
55961d5530 Release new version 2022-01-03 09:08:00 +01:00
Lei Nelissen
7c32fb3599 Release new builds 2022-01-03 09:07:38 +01:00
Lei Nelissen
56971a9291 Add migrations for the store 2022-01-03 09:07:30 +01:00
7 changed files with 32 additions and 14 deletions

View File

@@ -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";

View File

@@ -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>

View File

@@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>27</string>
<string>31</string>
</dict>
</plist>

View File

@@ -1,6 +1,6 @@
{
"name": "JellyfinAudioPlayer",
"version": "0.2.1",
"version": "0.2.2",
"main": "src/index.js",
"private": true,
"scripts": {

View File

@@ -7,7 +7,7 @@ interface State {
ids: EntityId[];
}
const initialState: State = {
export const initialState: State = {
entities: {},
ids: [],
};

View File

@@ -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,
),
});

View File

@@ -35,7 +35,7 @@ export interface State {
}
}
const initialState: State = {
export const initialState: State = {
albums: {
...albumAdapter.getInitialState(),
isLoading: false,