Skip to content

Commit

Permalink
Merge branch 'main' into @Skalakid/bump-react-native-live-markdown-0.…
Browse files Browse the repository at this point in the history
…1.176
  • Loading branch information
Skalakid committed Oct 24, 2024
2 parents 8d3c58b + 45cabbf commit 85c1a0d
Show file tree
Hide file tree
Showing 98 changed files with 1,865 additions and 269 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009005205
versionName "9.0.52-5"
versionCode 1009005300
versionName "9.0.53-0"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import com.expensify.chat.bootsplash.BootSplashPackage
import com.expensify.chat.shortcutManagerModule.ShortcutManagerPackage
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.modules.i18nmanager.I18nUtil
import com.facebook.soloader.SoLoader
Expand Down Expand Up @@ -44,6 +46,9 @@ class MainApplication : MultiDexApplication(), ReactApplication {
get() = BuildConfig.IS_HERMES_ENABLED
})

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)

override fun onCreate() {
super.onCreate()
ReactFontManager.getInstance().addCustomFont(this, "Expensify New Kansas", R.font.expensify_new_kansas)
Expand All @@ -59,7 +64,7 @@ class MainApplication : MultiDexApplication(), ReactApplication {
SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load(bridgelessEnabled = false)
load()
}
if (BuildConfig.DEBUG) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/cardfeeds-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/cardfeeds-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/compcard-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/compcard-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/compcard-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/csv-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/csv-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/csv-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/expenses-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/expenses-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/expenses-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/expenses-04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/expenses-05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/invoice-bulk-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/invoice-bulk-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/invoice-bulk-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/invoice-bulk-04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/invoice-bulk-05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/tax_tracking-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/tax_tracking-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ios/NewExpensify.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/FullStory/tools/FullStoryCommandLine\" \"${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}\"\n";
shellScript = "if [ \"$CONFIGURATION\" != \"DebugDevelopment\" ]; then\n \"${PODS_ROOT}/FullStory/tools/FullStoryCommandLine\" \"${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}\"\nelse\n echo \"Skipping FullStory Asset Uploader phase for DebugDevelopment scheme.\"\nfi\n";
};
5CF45ABA52C0BB0D7B9D139A /* [Expo] Configure project */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
5 changes: 0 additions & 5 deletions ios/NewExpensify/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ - (NSURL *)bundleURL
#endif
}

- (BOOL)bridgelessEnabled
{
return NO;
}

// This methods is needed to support the hardware keyboard shortcuts
- (NSArray *)keyCommands {
return [HardwareShortcuts sharedInstance].keyCommands;
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>9.0.52</string>
<string>9.0.53</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.52.5</string>
<string>9.0.53.0</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
8 changes: 0 additions & 8 deletions ios/NewExpensify/RCTBootSplash.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
//
// RCTBootSplash.h
// NewExpensify
//
// Created by Mathieu Acthernoene on 07/01/2022.
//

#import <React/RCTBridgeModule.h>
#import <React/RCTRootView.h>

@interface RCTBootSplash : NSObject <RCTBridgeModule>

Expand Down
160 changes: 76 additions & 84 deletions ios/NewExpensify/RCTBootSplash.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

#import <React/RCTUtils.h>

#if RCT_NEW_ARCH_ENABLED
#import <React/RCTSurfaceHostingProxyRootView.h>
#import <React/RCTSurfaceHostingView.h>
#else
#import <React/RCTRootView.h>
#endif

static NSMutableArray<RCTPromiseResolveBlock> *_resolveQueue = nil;
static RCTSurfaceHostingProxyRootView *_rootView = nil;

static UIView *_loadingView = nil;
static UIView *_rootView = nil;
static float _duration = 0;
static NSMutableArray<RCTPromiseResolveBlock> *_resolveQueue = [[NSMutableArray alloc] init];
static bool _fade = false;
static bool _nativeHidden = false;
static bool _transitioning = false;

@implementation RCTBootSplash

Expand All @@ -24,14 +21,18 @@ - (dispatch_queue_t)methodQueue {
return dispatch_get_main_queue();
}

+ (BOOL)requiresMainQueueSetup {
return NO;
}

+ (void)invalidateBootSplash {
_resolveQueue = nil;
_rootView = nil;
_nativeHidden = false;
}

+ (bool)isLoadingViewHidden {
return _loadingView == nil || [_loadingView isHidden];
+ (bool)isLoadingViewVisible {
return _loadingView != nil && ![_loadingView isHidden];
}

+ (bool)hasResolveQueue {
Expand All @@ -41,27 +42,23 @@ + (bool)hasResolveQueue {
+ (void)clearResolveQueue {
if (![self hasResolveQueue])
return;

while ([_resolveQueue count] > 0) {
RCTPromiseResolveBlock resolve = [_resolveQueue objectAtIndex:0];
[_resolveQueue removeObjectAtIndex:0];
resolve(@(true));
}
}

+ (void)hideLoadingView {
if ([self isLoadingViewHidden])
+ (void)hideAndClearPromiseQueue {
if (![self isLoadingViewVisible]) {
return [RCTBootSplash clearResolveQueue];
}

if (_duration > 0) {
if (_fade) {
dispatch_async(dispatch_get_main_queue(), ^{
_transitioning = true;

if (_rootView == nil)
return;

[UIView transitionWithView:_rootView
duration:_duration / 1000.0
duration:0.250
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
_loadingView.hidden = YES;
Expand All @@ -70,7 +67,6 @@ + (void)hideLoadingView {
[_loadingView removeFromSuperview];
_loadingView = nil;

_transitioning = false;
return [RCTBootSplash clearResolveQueue];
}];
});
Expand All @@ -85,30 +81,9 @@ + (void)hideLoadingView {

+ (void)initWithStoryboard:(NSString * _Nonnull)storyboardName
rootView:(UIView * _Nullable)rootView {
if (rootView == nil
#ifdef RCT_NEW_ARCH_ENABLED
|| ![rootView isKindOfClass:[RCTSurfaceHostingProxyRootView class]]
#else
|| ![rootView isKindOfClass:[RCTRootView class]]
#endif
|| _rootView != nil
|| [self hasResolveQueue] // hide has already been called, abort init
|| RCTRunningInAppExtension())
if (RCTRunningInAppExtension()) {
return;

#ifdef RCT_NEW_ARCH_ENABLED
RCTSurfaceHostingProxyRootView *proxy = (RCTSurfaceHostingProxyRootView *)rootView;
_rootView = (RCTSurfaceHostingView *)proxy.surface.view;
#else
_rootView = (RCTRootView *)rootView;
#endif

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil];

_loadingView = [[storyboard instantiateInitialViewController] view];
_loadingView.hidden = NO;

[_rootView addSubview:_loadingView];
}

[NSTimer scheduledTimerWithTimeInterval:0.35
repeats:NO
Expand All @@ -117,70 +92,87 @@ + (void)initWithStoryboard:(NSString * _Nonnull)storyboardName
_nativeHidden = true;

// hide has been called before native launch screen fade out
if ([self hasResolveQueue])
[self hideLoadingView];
if ([_resolveQueue count] > 0) {
[self hideAndClearPromiseQueue];
}
}];

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(onJavaScriptDidLoad)
name:RCTJavaScriptDidLoadNotification
object:nil];
if (rootView != nil) {
_rootView = (RCTSurfaceHostingProxyRootView *)rootView;

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(onJavaScriptDidFailToLoad)
name:RCTJavaScriptDidFailToLoadNotification
object:nil];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil];

_loadingView = [[storyboard instantiateInitialViewController] view];
_loadingView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_loadingView.frame = _rootView.bounds;
_loadingView.center = (CGPoint){CGRectGetMidX(_rootView.bounds), CGRectGetMidY(_rootView.bounds)};
_loadingView.hidden = NO;

[_rootView disableActivityIndicatorAutoHide:YES];
[_rootView setLoadingView:_loadingView];

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(onJavaScriptDidLoad)
name:RCTJavaScriptDidLoadNotification
object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(onJavaScriptDidFailToLoad)
name:RCTJavaScriptDidFailToLoadNotification
object:nil];
}
}

+ (void)onJavaScriptDidLoad {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}

+ (void)onJavaScriptDidFailToLoad {
[self hideLoadingView];
[self hideAndClearPromiseQueue];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (void)hide:(double)duration
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject {
if (_resolveQueue == nil)
_resolveQueue = [[NSMutableArray alloc] init];
- (NSDictionary *)constantsToExport {
UIWindow *window = RCTKeyWindow();
__block bool darkModeEnabled = false;

[_resolveQueue addObject:resolve];
RCTUnsafeExecuteOnMainQueueSync(^{
darkModeEnabled = window != nil && window.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark;
});

if ([RCTBootSplash isLoadingViewHidden] || RCTRunningInAppExtension())
return [RCTBootSplash clearResolveQueue];
return @{
@"darkModeEnabled": @(darkModeEnabled)
};
}

- (void)hideImpl:(BOOL)fade
resolve:(RCTPromiseResolveBlock)resolve {
if (_resolveQueue == nil)
_resolveQueue = [[NSMutableArray alloc] init];

[_resolveQueue addObject:resolve];

if (![RCTBootSplash isLoadingViewVisible] || RCTRunningInAppExtension())
return [RCTBootSplash clearResolveQueue];

_duration = lroundf((float)duration);
_fade = fade;

if (_nativeHidden)
return [RCTBootSplash hideLoadingView];
if (_nativeHidden)
return [RCTBootSplash hideAndClearPromiseQueue];
}

- (void)getVisibilityStatus:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject {
if ([RCTBootSplash isLoadingViewHidden])
return resolve(@"hidden");
else if (_transitioning)
return resolve(@"transitioning");
else
return resolve(@"visible");
- (void)isVisibleImpl:(RCTPromiseResolveBlock)resolve {
resolve(@([RCTBootSplash isLoadingViewVisible]));
}

RCT_REMAP_METHOD(hide,
resolve:(RCTPromiseResolveBlock)resolve
rejecte:(RCTPromiseRejectBlock)reject) {
[self hide:0
resolve:resolve
reject:reject];
RCT_EXPORT_METHOD(hide:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject) {
[self hideImpl:0 resolve:resolve];
}

RCT_REMAP_METHOD(getVisibilityStatus,
getVisibilityStatusWithResolve:(RCTPromiseResolveBlock)resolve
rejecte:(RCTPromiseRejectBlock)reject) {
[self getVisibilityStatus:resolve
reject:reject];
RCT_EXPORT_METHOD(isVisible:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject) {
[self isVisibleImpl:resolve];
}

@end
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>9.0.52</string>
<string>9.0.53</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.52.5</string>
<string>9.0.53.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>9.0.52</string>
<string>9.0.53</string>
<key>CFBundleVersion</key>
<string>9.0.52.5</string>
<string>9.0.53.0</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
Loading

0 comments on commit 85c1a0d

Please sign in to comment.