mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-03 14:40:54 +00:00
Add mapping for clearAllUserAttributes API
This commit is contained in:
parent
6c5702cf68
commit
cb3f67a7f5
@ -589,6 +589,18 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
|
||||
return mInstabug.getAllUserAttributes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all user attributes if exists.
|
||||
*/
|
||||
@ReactMethod
|
||||
public void clearAllUserAttributes() {
|
||||
try {
|
||||
mInstabug.clearAllUserAttributes();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private Locale getLocaleByKey(String instabugLocale) {
|
||||
String localeInLowerCase = instabugLocale.toLowerCase();
|
||||
switch (localeInLowerCase) {
|
||||
|
33
index.js
33
index.js
@ -675,6 +675,15 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears all user attributes if exists.
|
||||
*/
|
||||
clearAllUserAttributes(){
|
||||
if (Platform.OS === 'android') {
|
||||
Instabug.clearAllUserAttributes();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* The event used to invoke the feedback form
|
||||
* @readonly
|
||||
@ -686,7 +695,8 @@ module.exports = {
|
||||
screenshot: Instabug.invocationEventScreenshot,
|
||||
twoFingersSwipe: Instabug.invocationEventTwoFingersSwipe,
|
||||
floatingButton: Instabug.invocationEventFloatingButton
|
||||
},
|
||||
}
|
||||
,
|
||||
/**
|
||||
* Type of SDK dismiss
|
||||
* @readonly
|
||||
@ -696,7 +706,8 @@ module.exports = {
|
||||
submit: Instabug.dismissTypeSubmit,
|
||||
cancel: Instabug.dismissTypeCancel,
|
||||
addAttachment: Instabug.dismissTypeAddAttachment
|
||||
},
|
||||
}
|
||||
,
|
||||
/**
|
||||
* Type of report to be submit
|
||||
* @readonly
|
||||
@ -705,7 +716,8 @@ module.exports = {
|
||||
reportType: {
|
||||
bug: Instabug.reportTypeBug,
|
||||
feedback: Instabug.reportTypeFeedback
|
||||
},
|
||||
}
|
||||
,
|
||||
/**
|
||||
* The mode used upon invocating the SDK
|
||||
* @readonly
|
||||
@ -717,7 +729,8 @@ module.exports = {
|
||||
newFeedback: Instabug.invocationModeNewFeedback,
|
||||
newChat: Instabug.invocationModeNewChat,
|
||||
chatsList: Instabug.invocationModeChatsList
|
||||
},
|
||||
}
|
||||
,
|
||||
/**
|
||||
* The supported locales
|
||||
* @readonly
|
||||
@ -740,7 +753,8 @@ module.exports = {
|
||||
spanish: Instabug.localeSpanish,
|
||||
swedish: Instabug.localeSwedish,
|
||||
turkish: Instabug.localeTurkish
|
||||
},
|
||||
}
|
||||
,
|
||||
/**
|
||||
* The color theme of the different UI elements
|
||||
* @readonly
|
||||
@ -749,7 +763,8 @@ module.exports = {
|
||||
colorTheme: {
|
||||
light: Instabug.colorThemeLight,
|
||||
dark: Instabug.colorThemeDark
|
||||
},
|
||||
}
|
||||
,
|
||||
/**
|
||||
* Rectangle edges
|
||||
* @readonly
|
||||
@ -760,7 +775,8 @@ module.exports = {
|
||||
minY: Instabug.rectMinYEdge,
|
||||
maxX: Instabug.rectMaxXEdge,
|
||||
maxY: Instabug.rectMaxYEdge
|
||||
},
|
||||
}
|
||||
,
|
||||
/**
|
||||
* Instabug strings
|
||||
* @readonly
|
||||
@ -806,4 +822,5 @@ module.exports = {
|
||||
messageNotification: Instabug.messageNotification,
|
||||
messagesNotificationAndOthers: Instabug.messagesNotificationAndOthers
|
||||
}
|
||||
};
|
||||
}
|
||||
;
|
Loading…
x
Reference in New Issue
Block a user