Merge pull request #2392 from ecency/nt/migration-hotfix

Nt/Migration Hotfix
This commit is contained in:
Feruz M 2022-07-27 09:34:08 +03:00 committed by GitHub
commit 99eb404040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 24 additions and 23 deletions

View File

@ -144,7 +144,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
versionName "3.0.31"
versionName "3.0.32"
resValue "string", "build_config_package", "app.esteem.mobile.android"
multiDexEnabled true
// react-native-image-crop-picker

View File

@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.31</string>
<string>3.0.32</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2810</string>
<string>2811</string>
<key>LSRequiresIPhoneOS</key>
<true />
<key>NSAppTransportSecurity</key>

View File

@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.31</string>
<string>3.0.32</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2810</string>
<string>2811</string>
</dict>
</plist>

View File

@ -1132,7 +1132,7 @@
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2810;
CURRENT_PROJECT_VERSION = 2811;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 75B6RXTKGT;
EXCLUDED_ARCHS = "";
@ -1211,7 +1211,7 @@
CODE_SIGN_ENTITLEMENTS = Ecency/Ecency.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2810;
CURRENT_PROJECT_VERSION = 2811;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 75B6RXTKGT;
EXCLUDED_ARCHS = "";

View File

@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.31</string>
<string>3.0.32</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>

View File

@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.31</string>
<string>3.0.32</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2810</string>
<string>2811</string>
</dict>
</plist>

View File

@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.0.31</string>
<string>3.0.32</string>
<key>CFBundleVersion</key>
<string>2810</string>
<string>2811</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>

View File

@ -1,6 +1,6 @@
{
"name": "ecency",
"version": "3.0.31",
"version": "3.0.32",
"displayName": "Ecency",
"private": true,
"rnpm": {

View File

@ -66,7 +66,7 @@ interface State {
isPinCodeOpen: boolean;
isRenderRequired: boolean;
lastAppVersion:string;
settingsMigrated: boolean;
settingsMigratedV2: boolean;
hidePostsThumbnails: boolean;
isTermsAccepted: boolean;
}
@ -102,10 +102,10 @@ const initialState:State = {
upvotePercent: 1,
nsfw: '1',
pin: null,
isPinCodeOpen: true,
isPinCodeOpen: false,
isRenderRequired: false,
lastAppVersion:'',
settingsMigrated: false,
settingsMigratedV2: false,
hidePostsThumbnails: false,
isTermsAccepted: false,
};
@ -268,7 +268,7 @@ export default function (state = initialState, action) {
case SET_SETTINGS_MIGRATED:
return {
...state,
settingsMigrated:action.payload
settingsMigratedV2:action.payload
}
case HIDE_POSTS_THUMBNAILS:

View File

@ -31,9 +31,9 @@ import {
//migrates settings from realm to redux once and do no user realm for settings again;
export const migrateSettings = async (dispatch: any, settingsMigrated: boolean) => {
export const migrateSettings = async (dispatch: any, settingsMigratedV2: boolean) => {
if (settingsMigrated) {
if (settingsMigratedV2) {
return;
}
@ -50,7 +50,7 @@ export const migrateSettings = async (dispatch: any, settingsMigrated: boolean)
const isDarkMode = Appearance.getColorScheme() === 'dark';
dispatch(isDarkTheme(settings.isDarkTheme !== null ? settings.isDarkTheme : isDarkMode));
dispatch(setColorTheme(THEME_OPTIONS.findIndex(item => item.value === settings.isDarkTheme)));
if (settings.isPinCodeOpen !== '') await dispatch(isPinCodeOpen(settings.isPinCodeOpen));
await dispatch(isPinCodeOpen(!!settings.isPinCodeOpen));
if (settings.language !== '') dispatch(setLanguage(settings.language));
if (settings.server !== '') dispatch(setApi(settings.server));
if (settings.upvotePercent !== '') {

View File

@ -418,9 +418,10 @@ class ApplicationContainer extends Component {
_fetchApp = async () => {
const {dispatch, settingsMigrated} = this.props;
const {dispatch, settingsMigratedV2} = this.props;
await MigrationHelpers.migrateSettings(dispatch, settingsMigratedV2)
await MigrationHelpers.migrateSettings(dispatch, settingsMigrated)
this._refreshGlobalProps();
await this._getUserDataFromRealm();
this._compareAndPromptForUpdate();
@ -992,7 +993,7 @@ export default connect(
isGlobalRenderRequired: state.application.isRenderRequired,
isAnalytics: state.application.isAnalytics,
lastUpdateCheck: state.application.lastUpdateCheck,
settingsMigrated: state.application.settingsMigrated,
settingsMigratedV2: state.application.settingsMigratedV2,
isNotificationsEnabled: state.application.isNotificationOpen,
notificationDetails: state.application.notificationDetails,