Skip to content

Commit

Permalink
Merge pull request #1002 from tonwhales/release/v2.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlkv authored Jul 23, 2024
2 parents 28bec9c + 6dd2f08 commit 00a410e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 21 deletions.
2 changes: 1 addition & 1 deletion VERSION_CODE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
202
203
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.tonhub.wallet.modules.appearance;

import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;

Expand Down Expand Up @@ -45,28 +47,52 @@ public String getName() {
return "AppearanceModule";
}

@SuppressLint("UnspecifiedRegisterReceiverFlag")
@Override
public void initialize() {
super.initialize();
ReactApplicationContext rnAppContext = getReactApplicationContext();
rnAppContext
.getApplicationContext()
.registerReceiver(
new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Bundle extras = intent.getExtras();
if (extras != null) {
String style = extras.getString("style");
if (style != null) {
rnAppContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(APPEARANCE_CHANGED_EVENT_NAME, style);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
rnAppContext
.getApplicationContext()
.registerReceiver(
new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Bundle extras = intent.getExtras();
if (extras != null) {
String style = extras.getString("style");
if (style != null) {
rnAppContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(APPEARANCE_CHANGED_EVENT_NAME, style);
}
}
}
}
},
new IntentFilter(THEME_STYLE_UPDATED_ACTION)
);
},
new IntentFilter(THEME_STYLE_UPDATED_ACTION),
Context.RECEIVER_NOT_EXPORTED
);
} else {
rnAppContext
.getApplicationContext()
.registerReceiver(
new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Bundle extras = intent.getExtras();
if (extras != null) {
String style = extras.getString("style");
if (style != null) {
rnAppContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(APPEARANCE_CHANGED_EVENT_NAME, style);
}
}
}
},
new IntentFilter(THEME_STYLE_UPDATED_ACTION)
);
}
}
}
4 changes: 2 additions & 2 deletions ios/wallet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>2.3.8</string>
<string>2.3.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -41,7 +41,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>202</string>
<string>203</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wallet",
"version": "2.3.8",
"version": "2.3.9",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
Expand Down

0 comments on commit 00a410e

Please sign in to comment.