app head: fix launch urls and notification target urls

This commit is contained in:
Akinwale Ariwodola 2019-10-31 07:55:36 +01:00
parent 9ffaba4358
commit fb497cebfe
3 changed files with 18 additions and 12 deletions
src/main/java/io/lbry/browser

View file

@ -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);