From a0b07fe298a760abadae3be5d946fa1f0d13bcde Mon Sep 17 00:00:00 2001 From: Radek Czemerys Date: Tue, 15 Dec 2020 18:59:51 +0100 Subject: [PATCH 1/3] [skip ci] drop iOS 9 support --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9f51586..a2238225 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ### Download Options: -- [iOS App Store](https://itunes.apple.com/us/app/standard-notes/id1285392450?mt=8) (iOS 9+) +- [iOS App Store](https://itunes.apple.com/us/app/standard-notes/id1285392450?mt=8) (iOS 10+) - [Google Play](https://play.google.com/store/apps/details?id=com.standardnotes) (Android 5.0+) - [F-Droid](https://f-droid.org/packages/com.standardnotes/) (Android 5.0+) - [Direct APK](https://github.com/standardnotes/mobile/releases) From 3cc4be7b8b5f091b22f1654af74ae2f256074402 Mon Sep 17 00:00:00 2001 From: Radek Czemerys Date: Fri, 18 Dec 2020 20:28:50 +0100 Subject: [PATCH 2/3] fix: phantom account issue #333 #312 #311 --- package.json | 6 +++--- src/App.tsx | 2 ++ yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 3b89951d..53b3c16f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "StandardNotes", - "version": "3.5.12", - "user-version": "3.5.12", + "version": "3.5.13", + "user-version": "3.5.13", "private": true, "license": "AGPL-3.0-or-later", "scripts": { @@ -54,7 +54,7 @@ "react-navigation-header-buttons": "^6.0.0", "sn-textview": "standardnotes/sn-textview#440dbd60eedef4397b6272735e68d4579bb41ac8", "@standardnotes/sncrypto-common": "1.2.9", - "@standardnotes/snjs": "2.0.24", + "@standardnotes/snjs": "2.0.27", "standard-notes-rn": "standardnotes/standard-notes-rn#996b016", "styled-components": "^5.2.1" }, diff --git a/src/App.tsx b/src/App.tsx index 116525c8..eaabd143 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,6 +3,7 @@ import { MobileApplication } from '@Lib/application'; import { ApplicationGroup } from '@Lib/application_group'; import { navigationRef } from '@Lib/navigation_service'; import { DefaultTheme, NavigationContainer } from '@react-navigation/native'; +import { DeinitSource } from '@standardnotes/snjs'; import { MobileThemeVariables } from '@Style/Themes/styled-components'; import { ThemeService, ThemeServiceContext } from '@Style/theme_service'; import React, { useCallback, useEffect, useRef, useState } from 'react'; @@ -79,6 +80,7 @@ const AppComponent: React.FC<{ return () => { themeServiceInstance?.deinit(); setThemeServiceRef(undefined); + application.deinit(DeinitSource.Lock); }; }, [application, application.Uuid, env, launchApp, setThemeServiceRef]); diff --git a/yarn.lock b/yarn.lock index d653de5f..49821fbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1485,10 +1485,10 @@ resolved "https://registry.yarnpkg.com/@standardnotes/sncrypto-common/-/sncrypto-common-1.2.9.tgz#5212a959e4ec563584e42480bfd39ef129c3cbdf" integrity sha512-xJ5IUGOZztjSgNP/6XL+Ut5+q9UgSTv6xMtKkcQC5aJxCOkJy9u6RamPLdF00WQgwibxx2tu0e43bKUjTgzMig== -"@standardnotes/snjs@2.0.24": - version "2.0.24" - resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.0.24.tgz#a42c181a9481464151ee366eabedf777d6aabd07" - integrity sha512-GBUfoHyjk55YbwS1+pTUHNUYmR0FIPCcy4O8vfu8wdBdlmvdOGGHAuzys8AB3Qw0o5GyeXDhymTPEj9nirD8lQ== +"@standardnotes/snjs@2.0.27": + version "2.0.27" + resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.0.27.tgz#6356f17c3ff2288a35ddf4cb311872c0e73dc54c" + integrity sha512-VEhqsgnYHTBD49SMNAn276dbPP4KN1pQQhtJFh9dM9JK2LS0OsbYuatiNS0bzEXkxVCaSYLTsaRb3rk7tciQyg== dependencies: "@standardnotes/sncrypto-common" "^1.2.9" From 6ae5260d6e41b23e2bbb9a348a72499370563d68 Mon Sep 17 00:00:00 2001 From: Radek Czemerys Date: Sun, 20 Dec 2020 00:52:32 +0100 Subject: [PATCH 3/3] fix: double app deinit on app lock --- .github/workflows/build-prod.yml | 4 ++++ .github/workflows/build.yml | 4 ++++ src/App.tsx | 5 +++-- src/lib/application.ts | 6 ++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml index fd5dbf7f..cbd8178b 100644 --- a/.github/workflows/build-prod.yml +++ b/.github/workflows/build-prod.yml @@ -20,6 +20,10 @@ jobs: gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch keystore.keystore.asc > android/app/keystore.keystore - name: Install dependencies run: yarn install + - name: Ruby Setup for Fastlane + uses: actions/setup-ruby@v1 + with: + ruby-version: '2.7' - name: fastlane uses: maierj/fastlane-action@v1.4.0 env: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44d866bc..9b8d3d4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,10 @@ jobs: run: | echo "${{ secrets.DEV_KEYSTORE }}" > keystore.keystore.asc gpg -d --passphrase "${{ secrets.DEV_KEYSTORE_PASSPHRASE }}" --batch keystore.keystore.asc > android/app/keystore.keystore + - name: Ruby Setup for Fastlane + uses: actions/setup-ruby@v1 + with: + ruby-version: '2.7' - name: Install dependencies run: yarn install - name: fastlane diff --git a/src/App.tsx b/src/App.tsx index eaabd143..3dd3a48c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -64,7 +64,6 @@ const AppComponent: React.FC<{ let themeServiceInstance: ThemeService; const loadApplication = async () => { themeServiceInstance = new ThemeService(application); - setThemeServiceRef(themeServiceInstance); await application?.prepareForLaunch({ receiveChallenge: async challenge => { @@ -80,7 +79,9 @@ const AppComponent: React.FC<{ return () => { themeServiceInstance?.deinit(); setThemeServiceRef(undefined); - application.deinit(DeinitSource.Lock); + if (!application.hasStartedDeinit()) { + application.deinit(DeinitSource.Lock); + } }; }, [application, application.Uuid, env, launchApp, setThemeServiceRef]); diff --git a/src/lib/application.ts b/src/lib/application.ts index 46e65897..f79dbdaa 100644 --- a/src/lib/application.ts +++ b/src/lib/application.ts @@ -36,6 +36,7 @@ export class MobileApplication extends SNApplication { private MobileServices!: MobileServices; public editorGroup: EditorGroup; public componentGroup: ComponentGroup; + private startedDeinit: boolean = false; public Uuid: string; // UI remounts when Uuid changes constructor(deviceInterface: MobileDeviceInterface, identifier: string) { @@ -62,8 +63,13 @@ export class MobileApplication extends SNApplication { this.componentGroup = new ComponentGroup(this); } + public hasStartedDeinit() { + return this.startedDeinit; + } + /** @override */ deinit(source: DeinitSource) { + this.startedDeinit = true; for (const key of Object.keys(this.MobileServices)) { const service = (this.MobileServices as any)[key]; if (service.deinit) {