A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: fix crash on configuration changed on android
Ammar Ahmed4ff42f1ae417
diff --git a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.javaindex d574144de..43e46657a 100644--- a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java+++ b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/MainActivity.java@@ -20,7 +20,7 @@ import com.zoontek.rnbootsplash.RNBootSplash;public class MainActivity extends ReactActivity {@Override- protected void onCreate(Bundle savedInstanceState) {+ protected void onCreate(Bundle savedInstanceState) {RNBootSplash.init(this, R.style.BootTheme);super.onCreate(null);@@ -60,20 +60,20 @@ public class MainActivity extends ReactActivity {DefaultNewArchitectureEntryPoint.getFabricEnabled());}-@Override-public void onNewIntent(Intent intent) {- super.onNewIntent(intent);- setIntent(intent);-}+ @Override+ public void onNewIntent(Intent intent) {+ super.onNewIntent(intent);+ setIntent(intent);+ }-@Override-public void onConfigurationChanged(Configuration newConfig) {- super.onConfigurationChanged(newConfig);- getReactInstanceManager().onConfigurationChanged(this, newConfig);- Intent intent = new Intent("onConfigurationChanged");- intent.putExtra("newConfig", newConfig);- this.sendBroadcast(intent);-}+ @Override+ public void onConfigurationChanged(Configuration newConfig) {+ super.onConfigurationChanged(newConfig);+ getReactHost().onConfigurationChanged(this);+ Intent intent = new Intent("onConfigurationChanged");+ intent.putExtra("newConfig", newConfig);+ this.sendBroadcast(intent);+ }@Overrideprotected String getMainComponentName() {