mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-01 13:40:42 +00:00
📝 Adjust setAttachmentTypesEnabled api to account for the change in the native api and removing the voice note attribute
This commit is contained in:
parent
0d6e4ae960
commit
d2cf3479e9
2
index.js
2
index.js
@ -402,9 +402,7 @@ module.exports = {
|
||||
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
|
||||
*/
|
||||
setAttachmentTypesEnabled: function (screenshot, extraScreenshot, galleryImage, screenRecording) {
|
||||
if(Platform.OS == 'android')
|
||||
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, screenRecording);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,7 @@
|
||||
#import <asl.h>
|
||||
#import <React/RCTLog.h>
|
||||
#import <os/log.h>
|
||||
#import <InstabugCore/IBGTypes.h>
|
||||
|
||||
@implementation InstabugReactBridge
|
||||
|
||||
@ -184,16 +185,25 @@ RCT_EXPORT_METHOD(setString:(NSString*)value toKey:(IBGString)key) {
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setAttachmentTypesEnabled:(BOOL)screenShot
|
||||
extraScreenShot:(BOOL)extraScreenShot
|
||||
galleryImage:(BOOL)galleryImage
|
||||
voiceNote:(BOOL)voiceNote
|
||||
screenRecording:(BOOL)screenRecording) {
|
||||
[Instabug setAttachmentTypesEnabledScreenShot:screenShot
|
||||
extraScreenShot:extraScreenShot
|
||||
galleryImage:galleryImage
|
||||
voiceNote:voiceNote
|
||||
screenRecording:screenRecording];
|
||||
}
|
||||
extraScreenShot:(BOOL)extraScreenShot
|
||||
galleryImage:(BOOL)galleryImage
|
||||
screenRecording:(BOOL)screenRecording) {
|
||||
IBGAttachmentType attachmentTypes = 0;
|
||||
if(screenShot) {
|
||||
attachmentTypes = IBGAttachmentTypeScreenShot;
|
||||
}
|
||||
if(extraScreenShot) {
|
||||
attachmentTypes |= IBGAttachmentTypeExtraScreenShot;
|
||||
}
|
||||
if(galleryImage) {
|
||||
attachmentTypes |= IBGAttachmentTypeGalleryImage;
|
||||
}
|
||||
if(screenRecording) {
|
||||
attachmentTypes |= IBGAttachmentTypeScreenRecording;
|
||||
}
|
||||
|
||||
[Instabug setEnabledAttachmentTypes:attachmentTypes];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setChatNotificationEnabled:(BOOL)isChatNotificationEnabled) {
|
||||
[Instabug setChatNotificationEnabled:isChatNotificationEnabled];
|
||||
|
Loading…
x
Reference in New Issue
Block a user