Skip to content

Commit 38ea8a2

Browse files
authored
Merge pull request #3 from Expensify/main
Even with dev
2 parents 6a66f0b + 51fc2f2 commit 38ea8a2

File tree

400 files changed

+11504
-5937
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+11504
-5937
lines changed

.eslintrc.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ module.exports = {
3737
overrides: [
3838
{
3939
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
40+
plugins: ['react'],
4041
rules: {
4142
'rulesdir/no-multiple-onyx-in-file': 'off',
4243
'rulesdir/onyx-props-must-have-default': 'off',
4344
'react-native-a11y/has-accessibility-hint': ['off'],
45+
'react/jsx-no-constructed-context-values': 'error',
4446
'react-native-a11y/has-valid-accessibility-descriptors': [
4547
'error',
4648
{
@@ -116,7 +118,7 @@ module.exports = {
116118
},
117119
{
118120
selector: ['parameter', 'method'],
119-
format: ['camelCase'],
121+
format: ['camelCase', 'PascalCase'],
120122
},
121123
],
122124
'@typescript-eslint/ban-types': [

.github/actions/javascript/bumpVersion/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,6 @@ function getPreviousVersion(currentVersion, level) {
298298
if (patch === 0) {
299299
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
300300
}
301-
if (major === 1 && minor === 3 && patch === 83) {
302-
return getVersionStringFromNumber(major, minor, patch - 2, 0);
303-
}
304301
return getVersionStringFromNumber(major, minor, patch - 1, 0);
305302
}
306303

.github/actions/javascript/createOrUpdateStagingDeploy/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -998,9 +998,6 @@ function getPreviousVersion(currentVersion, level) {
998998
if (patch === 0) {
999999
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
10001000
}
1001-
if (major === 1 && minor === 3 && patch === 83) {
1002-
return getVersionStringFromNumber(major, minor, patch - 2, 0);
1003-
}
10041001
return getVersionStringFromNumber(major, minor, patch - 1, 0);
10051002
}
10061003

.github/actions/javascript/getDeployPullRequestList/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -961,9 +961,6 @@ function getPreviousVersion(currentVersion, level) {
961961
if (patch === 0) {
962962
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
963963
}
964-
if (major === 1 && minor === 3 && patch === 83) {
965-
return getVersionStringFromNumber(major, minor, patch - 2, 0);
966-
}
967964
return getVersionStringFromNumber(major, minor, patch - 1, 0);
968965
}
969966

.github/actions/javascript/getPreviousVersion/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ function getPreviousVersion(currentVersion, level) {
148148
if (patch === 0) {
149149
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
150150
}
151-
if (major === 1 && minor === 3 && patch === 83) {
152-
return getVersionStringFromNumber(major, minor, patch - 2, 0);
153-
}
154151
return getVersionStringFromNumber(major, minor, patch - 1, 0);
155152
}
156153

.github/libs/versionUpdater.js

-3
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ function getPreviousVersion(currentVersion, level) {
118118
if (patch === 0) {
119119
return getPreviousVersion(currentVersion, SEMANTIC_VERSION_LEVELS.MINOR);
120120
}
121-
if (major === 1 && minor === 3 && patch === 83) {
122-
return getVersionStringFromNumber(major, minor, patch - 2, 0);
123-
}
124121
return getVersionStringFromNumber(major, minor, patch - 1, 0);
125122
}
126123

.github/workflows/platformDeploy.yml

+14
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ jobs:
104104
name: android-sourcemap
105105
path: android/app/build/generated/sourcemaps/react/release/*.map
106106

107+
- name: Upload Android version to GitHub artifacts
108+
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
109+
uses: actions/upload-artifact@v3
110+
with:
111+
name: app-production-release.aab
112+
path: android/app/build/outputs/bundle/productionRelease/app-production-release.aab
113+
107114
- name: Upload Android version to Browser Stack
108115
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
109116
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@./android/app/build/outputs/bundle/productionRelease/app-production-release.aab"
@@ -238,6 +245,13 @@ jobs:
238245
name: ios-sourcemap
239246
path: main.jsbundle.map
240247

248+
- name: Upload iOS version to GitHub artifacts
249+
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
250+
uses: actions/upload-artifact@v3
251+
with:
252+
name: New Expensify.ipa
253+
path: /Users/runner/work/App/App/New Expensify.ipa
254+
241255
- name: Upload iOS version to Browser Stack
242256
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
243257
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@/Users/runner/work/App/App/New Expensify.ipa"

.well-known/apple-app-site-association

+8
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@
7979
{
8080
"/": "/search/*",
8181
"comment": "Search"
82+
},
83+
{
84+
"/": "/send/*",
85+
"comment": "Send money"
86+
},
87+
{
88+
"/": "/money2020/*",
89+
"comment": "Money 2020"
8290
}
8391
]
8492
}

__mocks__/react-native.js

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jest.doMock('react-native', () => {
2828
BootSplash: {
2929
getVisibilityStatus: jest.fn(),
3030
hide: jest.fn(),
31+
logoSizeRatio: 1,
3132
navigationBarHeight: 0,
3233
},
3334
StartupTimer: {stop: jest.fn()},

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ android {
9090
minSdkVersion rootProject.ext.minSdkVersion
9191
targetSdkVersion rootProject.ext.targetSdkVersion
9292
multiDexEnabled rootProject.ext.multiDexEnabled
93-
versionCode 1001038400
94-
versionName "1.3.84-0"
93+
versionCode 1001038708
94+
versionName "1.3.87-8"
9595
}
9696

9797
flavorDimensions "default"

android/app/src/main/AndroidManifest.xml

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/request"/>
7171
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/new"/>
7272
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/search"/>
73+
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/send"/>
74+
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/money2020"/>
7375

7476
<!-- Staging URLs -->
7577
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/r"/>
@@ -87,6 +89,8 @@
8789
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/request"/>
8890
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/new"/>
8991
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/search"/>
92+
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/send"/>
93+
<data android:scheme="https" android:host="staging.new.expensify.com" android:pathPrefix="/money2020"/>
9094
</intent-filter>
9195
</activity>
9296

android/app/src/main/java/com/expensify/chat/bootsplash/BootSplashDialog.java

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import android.view.Window;
77
import android.view.WindowManager.LayoutParams;
88
import androidx.annotation.NonNull;
9+
import com.expensify.chat.R;
910

1011
public class BootSplashDialog extends Dialog {
1112

@@ -26,6 +27,10 @@ protected void onCreate(Bundle savedInstanceState) {
2627

2728
if (window != null) {
2829
window.setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
30+
31+
if (BootSplashModule.isSamsungOneUI4()) {
32+
window.setBackgroundDrawableResource(R.drawable.bootsplash_samsung_oneui_4);
33+
}
2934
}
3035

3136
super.onCreate(savedInstanceState);

android/app/src/main/java/com/expensify/chat/bootsplash/BootSplashModule.java

+15
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.facebook.react.common.ReactConstants;
2424
import com.facebook.react.module.annotations.ReactModule;
2525
import com.facebook.react.uimanager.PixelUtil;
26+
import java.lang.reflect.Field;
2627
import java.util.HashMap;
2728
import java.util.Map;
2829
import java.util.Timer;
@@ -47,6 +48,19 @@ public String getName() {
4748
return NAME;
4849
}
4950

51+
// From https://stackoverflow.com/a/61062773
52+
public static boolean isSamsungOneUI4() {
53+
String name = "SEM_PLATFORM_INT";
54+
55+
try {
56+
Field field = Build.VERSION.class.getDeclaredField(name);
57+
int version = (field.getInt(null) - 90000) / 10000;
58+
return version == 4;
59+
} catch (Exception ignored) {
60+
return false;
61+
}
62+
}
63+
5064
@Override
5165
public Map<String, Object> getConstants() {
5266
final HashMap<String, Object> constants = new HashMap<>();
@@ -61,6 +75,7 @@ public Map<String, Object> getConstants() {
6175
? Math.round(PixelUtil.toDIPFromPixel(resources.getDimensionPixelSize(heightResId)))
6276
: 0;
6377

78+
constants.put("logoSizeRatio", isSamsungOneUI4() ? 0.5 : 1);
6479
constants.put("navigationBarHeight", height);
6580
return constants;
6681
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:opacity="opaque">
6+
<item android:gravity="fill">
7+
<color android:color="?attr/windowSplashScreenBackground" />
8+
</item>
9+
10+
<!-- There's an issue with logo size on Samsung OneUI v4
11+
We need to render it 2 times smaller (288 / 2 = 144) -->
12+
<item
13+
tools:ignore="UnusedAttribute"
14+
android:drawable="?windowSplashScreenAnimatedIcon"
15+
android:gravity="center"
16+
android:width="144dp"
17+
android:height="144dp" />
18+
</layer-list>

android/app/src/main/res/values/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
<style name="BootTheme" parent="Theme.SplashScreen">
7474
<item name="android:statusBarColor">@android:color/transparent</item>
75-
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
75+
<item name="windowSplashScreenAnimatedIcon">@drawable/bootsplash_logo</item>
7676
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
7777
</style>
7878

+23-38
Loading
+22-22
Loading

assets/images/bankicons/bb-t.svg

+25-27
Loading

0 commit comments

Comments
 (0)