Skip to content

Commit

Permalink
Merge pull request #863 from ChildMindInstitute/release/2.3.0
Browse files Browse the repository at this point in the history
Release/2.3.0
  • Loading branch information
ChaconC authored Oct 2, 2024
2 parents a14e5ed + 97e59ee commit f69033c
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 44 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ android {
applicationId "lab.childmindinstitute.data"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1585
versionName "2.2.2"
versionCode 1587
versionName "2.3.0"
resValue "string", "app_name", "Mindlogger"
resValue "string", "build_config_package", "lab.childmindinstitute.data"
manifestPlaceholders = [
Expand Down
48 changes: 24 additions & 24 deletions ios/MindloggerMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
Expand All @@ -1679,7 +1679,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
Expand All @@ -1698,15 +1698,15 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
INFOPLIST_FILE = MindloggerMobileTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
Expand All @@ -1728,7 +1728,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
ENABLE_BITCODE = NO;
Expand All @@ -1739,7 +1739,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1769,7 +1769,7 @@
CODE_SIGN_ENTITLEMENTS = MindloggerMobile/MindloggerMobileRelease.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
INFOPLIST_FILE = MindloggerMobile/Info.plist;
Expand All @@ -1779,7 +1779,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1979,7 +1979,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
ENABLE_BITCODE = NO;
Expand All @@ -1990,7 +1990,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -2019,7 +2019,7 @@
CODE_SIGN_ENTITLEMENTS = MindloggerMobileDevRelease.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
INFOPLIST_FILE = "MindloggerMobile dev-Info.plist";
Expand All @@ -2029,7 +2029,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -2058,7 +2058,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
ENABLE_BITCODE = NO;
Expand All @@ -2069,7 +2069,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -2099,7 +2099,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
INFOPLIST_FILE = "MindloggerMobile qa-Info.plist";
Expand All @@ -2109,7 +2109,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -2136,7 +2136,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingDebug.entitlements;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
ENABLE_BITCODE = NO;
Expand All @@ -2147,7 +2147,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -2176,7 +2176,7 @@
CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingRelease.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
INFOPLIST_FILE = "MindloggerMobile staging-Info.plist";
Expand All @@ -2186,7 +2186,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -2215,7 +2215,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
ENABLE_BITCODE = NO;
Expand All @@ -2226,7 +2226,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -2256,7 +2256,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1585;
CURRENT_PROJECT_VERSION = 1587;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6;
INFOPLIST_FILE = "MindloggerMobile uat-Info.plist";
Expand All @@ -2266,7 +2266,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
11 changes: 11 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,16 @@ abstract_target 'MindloggerMobileCommonPods' do
config[:reactNativePath],
:mac_catalyst_enabled => false
)

if ENV['LOCAL_DEV_PATCHES'] == 'true'
puts '[Local Dev] Removing .xcode.env.local'
%x(rm -f #{Pod::Config.instance.installation_root}/.xcode.env.local)

puts '[Local Dev] Patching YogaKit to fix YGMeasureView call signature'
%x(patch #{Pod::Config.instance.installation_root}/Pods/YogaKit/YogaKit/Source/YGLayout.m -N < #{Pod::Config.instance.installation_root}/patches/YGLayout.patch)

puts '[Local Dev] Patching Flipper to fix FlipperTransportTypes'
%x(patch #{Pod::Config.instance.installation_root}/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h -N < #{Pod::Config.instance.installation_root}/patches/FlipperTransportTypes.patch)
end
end
end
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,6 @@ SPEC CHECKSUMS:
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
ZIPFoundation: d170fa8e270b2a32bef9dcdcabff5b8f1a5deced

PODFILE CHECKSUM: 407c2bad1f5a0b2a39e0f4ece4251ac7baf4239e
PODFILE CHECKSUM: d42abdc8fa507a4e3e735244c7602178c3fea946

COCOAPODS: 1.14.3
7 changes: 7 additions & 0 deletions ios/patches/FlipperTransportTypes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--- ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h.orig 2024-07-30 10:35:01
+++ ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h 2024-07-30 10:19:31
@@ -8,3 +8,3 @@
#pragma once
+#include <functional>
-
#include <string>
11 changes: 11 additions & 0 deletions ios/patches/YGLayout.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- ios/Pods/YogaKit/YogaKit/Source/YGLayout.m.orig 2024-07-30 10:35:01
+++ ios/Pods/YogaKit/YogaKit/Source/YGLayout.m 2024-07-30 10:19:31
@@ -324,7 +324,7 @@
#pragma mark - Private

static YGSize YGMeasureView(
- YGNodeRef node,
+ YGNodeConstRef node,
float width,
YGMeasureMode widthMode,
float height,
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mindlogger-mobile",
"version": "2.2.2",
"version": "2.3.0",
"private": true,
"scripts": {
"android": "yarn android:dev",
Expand All @@ -14,6 +14,7 @@
"prettier:check": "prettier '**/*.{js,jsx,ts,tsx}' --check",
"prettier:fix": "prettier '**/*.{js,jsx,ts,tsx}' --write",
"pods": "bundle exec pod install --project-directory=ios",
"pods:local": "LOCAL_DEV_PATCHES=true yarn pods",
"prepare": "husky install",
"postinstall": "yarn patch-package",
"bump": "bundle exec fastlane bump_version",
Expand Down
5 changes: 2 additions & 3 deletions src/shared/lib/hooks/useUploadProgress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect } from 'react';

import { useTranslation } from 'react-i18next';

import { UploadProgressObservable, wait } from '../';
import { UploadProgressObservable } from '../';
import { SecondLevelStep, UploadProgress } from '../observables/';

import { useForceUpdate } from './';
Expand Down Expand Up @@ -98,9 +98,8 @@ const useUploadProgress = (): UseUploadProgressResult => {
}

useEffect(() => {
const onProgressChange = async (delay: number) => {
const onProgressChange = () => {
update();
await wait(delay);
};

UploadProgressObservable.addObserver(onProgressChange);
Expand Down
15 changes: 2 additions & 13 deletions src/shared/lib/observables/uploadProgressObservable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-nested-ternary */
import { CommonObservable } from '../utils';

export type SecondLevelStep =
Expand Down Expand Up @@ -26,10 +25,6 @@ export interface IUploadProgressObservableSetters {
reset(): void;
}

const ShortDelay = 100;
const MiddleDelay = 200;
const LongFakeStepDelay = 500;

class UploadProgressObservable
extends CommonObservable
implements IUploadProgressObservableSetters
Expand Down Expand Up @@ -61,19 +56,13 @@ class UploadProgressObservable

public async setTotalFilesInActivity(value: number | null) {
this.uploadProgress.totalFilesInActivity = value;
await this.notifyAsync(value === 0 ? LongFakeStepDelay : 0);
this.notify();
}

public async setCurrentSecondLevelStepKey(value: SecondLevelStep | null) {
this.uploadProgress.currentSecondLevelStepKey = value;

await this.notifyAsync(
value === 'upload_files' || value === 'encrypt_answers'
? ShortDelay
: value === 'completed'
? MiddleDelay
: 0,
);
this.notify();
}

public get totalActivities() {
Expand Down

0 comments on commit f69033c

Please sign in to comment.