app head: fix launch urls and notification target urls
This commit is contained in:
parent
9ffaba4358
commit
fb497cebfe
3 changed files with 18 additions and 12 deletions
src/main/java/io/lbry/browser
|
@ -534,17 +534,6 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
|
|||
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
|
||||
notificationManager.cancel(sourceNotificationId);
|
||||
}
|
||||
|
||||
// check for target (notification payload)
|
||||
String target = intent.getStringExtra("target");
|
||||
if (target != null && target.trim().length() > 0) {
|
||||
ReactContext reactContext = mReactInstanceManager.getCurrentReactContext();
|
||||
if (reactContext != null) {
|
||||
WritableMap params = Arguments.createMap();
|
||||
params.putString("url", target);
|
||||
reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit("onNotificationTargetLaunch", params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.onNewIntent(intent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue