mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2026-09-01 14:41:11 +00:00
Use Callbacks in getUserAttribute API
This commit is contained in:
@@ -645,13 +645,14 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
|
||||
* @return the desired user attribute
|
||||
*/
|
||||
@ReactMethod
|
||||
public String getUserAttribute(String key) {
|
||||
public void getUserAttribute(String key, Callback userAttributeCallback) {
|
||||
String userAttribute;
|
||||
try {
|
||||
return mInstabug.getUserAttribute(key);
|
||||
userAttribute = mInstabug.getUserAttribute(key);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
userAttributeCallback.invoke(userAttribute);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user