mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-01 13:40:42 +00:00
📝 Deprecated the old setAttachmentTypesEnabled api, and made it point to the new native api
This commit is contained in:
parent
d2cf3479e9
commit
6ae1d167a0
@ -360,7 +360,7 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
|
||||
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
|
||||
*/
|
||||
@ReactMethod
|
||||
public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreenshot, boolean
|
||||
public void setEnabledAttachmentTypes(boolean screenshot, boolean extraScreenshot, boolean
|
||||
galleryImage, boolean screenRecording) {
|
||||
try {
|
||||
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage,
|
||||
|
22
index.js
22
index.js
@ -391,6 +391,24 @@ module.exports = {
|
||||
Instabug.setString(string, key);
|
||||
},
|
||||
|
||||
/**
|
||||
* @deprecated since version 2.3.0. Use {@link setEnabledAttachmentTypes} instead.
|
||||
* Sets whether attachments in bug reporting and in-app messaging are enabled or not.
|
||||
* @param {boolean} screenshot A boolean to enable or disable screenshot attachments.
|
||||
* @param {boolean} extraScreenshot A boolean to enable or disable extra
|
||||
* screenshot attachments.
|
||||
* @param {boolean} galleryImage A boolean to enable or disable gallery image
|
||||
* attachments. In iOS 10+,NSPhotoLibraryUsageDescription should be set in
|
||||
* info.plist to enable gallery image attachments.
|
||||
* @param {boolean} voiceNote A boolean to enable or disable voice note attachments.
|
||||
* In iOS 10+, NSMicrophoneUsageDescription should be set in info.plist to enable
|
||||
* voiceNote attachments.
|
||||
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
|
||||
*/
|
||||
setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording) {
|
||||
Instabug.setEnabledAttachmentTypes(screenshot, extraScreenshot, galleryImage, screenRecording);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets whether attachments in bug reporting and in-app messaging are enabled or not.
|
||||
* @param {boolean} screenshot A boolean to enable or disable screenshot attachments.
|
||||
@ -401,8 +419,8 @@ module.exports = {
|
||||
* info.plist to enable gallery image attachments.
|
||||
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
|
||||
*/
|
||||
setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, screenRecording) {
|
||||
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, screenRecording);
|
||||
setEnabledAttachmentTypes: function (screenshot, extraScreenshot, galleryImage, screenRecording) {
|
||||
Instabug.setEnabledAttachmentTypes(screenshot, extraScreenshot, galleryImage, screenRecording);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -184,7 +184,7 @@ RCT_EXPORT_METHOD(setString:(NSString*)value toKey:(IBGString)key) {
|
||||
[Instabug setString:value toKey:key];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setAttachmentTypesEnabled:(BOOL)screenShot
|
||||
RCT_EXPORT_METHOD(setEnabledAttachmentTypes:(BOOL)screenShot
|
||||
extraScreenShot:(BOOL)extraScreenShot
|
||||
galleryImage:(BOOL)galleryImage
|
||||
screenRecording:(BOOL)screenRecording) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user