cobrowse-sdk-react-native
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -725,4 +725,4 @@ io.cobrowse.reactnative | ||
id cobrowse_error_constraint_layout | ||
id cobrowse_error_image | ||
id cobrowse_error_title | ||
id cobrowse_error_image2 | ||
id cobrowse_error_title2 | ||
id cobrowse_fragment_container | ||
@@ -873,3 +873,2 @@ id cobrowse_manage_constraint_layout | ||
layout activity_cobrowse | ||
layout activity_error | ||
layout dev_loading_view | ||
@@ -879,2 +878,3 @@ layout fps_view | ||
layout fragment_code_display | ||
layout fragment_error | ||
layout fragment_manage_session | ||
@@ -881,0 +881,0 @@ layout notification_action |
@@ -18,2 +18,10 @@ 'use strict'; | ||
static get SESSION_REQUESTED() { | ||
return CobrowseIONative.SESSION_REQUESTED; | ||
} | ||
static handleSessionRequest(session) { | ||
this.activateSession(); | ||
} | ||
static addListener(event, cb) { | ||
@@ -59,4 +67,4 @@ return emitter.addListener(event, cb); | ||
static loadSession(codeOrId) { | ||
return CobrowseIONative.loadSession(codeOrId); | ||
static getSession(codeOrId) { | ||
return CobrowseIONative.getSession(codeOrId); | ||
} | ||
@@ -68,1 +76,5 @@ | ||
} | ||
CobrowseIO.addListener(CobrowseIO.SESSION_REQUESTED, (session) => { | ||
CobrowseIO.onSessionRequest(session); | ||
}); |
@@ -55,12 +55,7 @@ import React, { Component } from 'react'; | ||
try { | ||
if (this.props.code) { | ||
const session = await CobrowseIO.loadSession(this.props.code); | ||
const current = await CobrowseIO.currentSession(); | ||
if (current) this.setState({ session:current }); | ||
else { | ||
const session = await CobrowseIO.createSession(); | ||
this.setState({ session }); | ||
} else { | ||
const current = await CobrowseIO.currentSession(); | ||
if (current) this.setState({ session:current }); | ||
else { | ||
const session = await CobrowseIO.createSession(); | ||
this.setState({ session }); | ||
} | ||
} | ||
@@ -67,0 +62,0 @@ } catch (error) { |
{ | ||
"name": "cobrowse-sdk-react-native", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Cobrowse SDK for React Native", | ||
@@ -5,0 +5,0 @@ "main": "./js/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
603143
74
208