Skip to content

Commit 9046a08

Browse files
author
Ali Abdelfattah
authored
Merge pull request #240 from Instabug/refactor/remove-deprecated-apis
[MOB-8884] Remove Deprecated APIs
2 parents de81576 + ba4674b commit 9046a08

File tree

8 files changed

+1
-106
lines changed

8 files changed

+1
-106
lines changed

android/src/main/java/com/instabug/instabugflutter/ArgsRegistry.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
162162
args.put("CustomTextPlaceHolderKey.invalidEmailMessage", InstabugCustomTextPlaceHolder.Key.INVALID_EMAIL_MESSAGE);
163163
args.put("CustomTextPlaceHolderKey.invalidCommentMessage", InstabugCustomTextPlaceHolder.Key.INVALID_COMMENT_MESSAGE);
164164
args.put("CustomTextPlaceHolderKey.invocationHeader", InstabugCustomTextPlaceHolder.Key.INVOCATION_HEADER);
165-
args.put("CustomTextPlaceHolderKey.startChats", InstabugCustomTextPlaceHolder.Key.START_CHATS);
166165
args.put("CustomTextPlaceHolderKey.reportQuestion", InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION);
167166
args.put("CustomTextPlaceHolderKey.reportBug", InstabugCustomTextPlaceHolder.Key.REPORT_BUG);
168167
args.put("CustomTextPlaceHolderKey.reportFeedback", InstabugCustomTextPlaceHolder.Key.REPORT_FEEDBACK);

android/src/main/java/com/instabug/instabugflutter/InstabugFlutterPlugin.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import com.instabug.apm.networking.APMNetworkLogger;
1515
import com.instabug.bug.BugReporting;
1616
import com.instabug.bug.invocation.Option;
17-
import com.instabug.chat.Chats;
1817
import com.instabug.chat.Replies;
1918
import com.instabug.crash.CrashReporting;
2019
import com.instabug.featuresrequest.FeatureRequests;
@@ -828,31 +827,6 @@ public void setEmailFieldRequiredForFeatureRequests(final Boolean isEmailRequire
828827
FeatureRequests.setEmailFieldRequired(isEmailRequired, actions);
829828
}
830829

831-
/**
832-
* Manual invocation for chats view.
833-
*/
834-
public void showChats() {
835-
Chats.show();
836-
}
837-
838-
/**
839-
* Enables and disables everything related to creating new chats.
840-
*
841-
* @param {boolean} isEnabled
842-
*/
843-
public void setChatsEnabled(final boolean isEnabled) {
844-
new Handler(Looper.getMainLooper()).post(new Runnable() {
845-
@Override
846-
public void run() {
847-
if (isEnabled) {
848-
Chats.setState(Feature.State.ENABLED);
849-
} else {
850-
Chats.setState(Feature.State.DISABLED);
851-
}
852-
}
853-
});
854-
}
855-
856830
/**
857831
* Enables and disables everything related to receiving replies.
858832
*

android/src/test/java/com/instabug/instabugflutter/ArgsRegistryTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ private List<InstabugCustomTextPlaceHolder.Key> getCurrentlySupportedKeysBySDK()
255255
keys.add(InstabugCustomTextPlaceHolder.Key.INVALID_EMAIL_MESSAGE);
256256
keys.add(InstabugCustomTextPlaceHolder.Key.INVALID_COMMENT_MESSAGE);
257257
keys.add(InstabugCustomTextPlaceHolder.Key.INVOCATION_HEADER);
258-
keys.add(InstabugCustomTextPlaceHolder.Key.START_CHATS);
259258
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION);
260259
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_BUG);
261260
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_FEEDBACK);
@@ -296,7 +295,6 @@ private List<InstabugCustomTextPlaceHolder.Key> getAllCustomTextPlaceHolderKeys(
296295
keys.add(InstabugCustomTextPlaceHolder.Key.INVALID_EMAIL_MESSAGE);
297296
keys.add(InstabugCustomTextPlaceHolder.Key.INVALID_COMMENT_MESSAGE);
298297
keys.add(InstabugCustomTextPlaceHolder.Key.INVOCATION_HEADER);
299-
keys.add(InstabugCustomTextPlaceHolder.Key.START_CHATS);
300298
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION);
301299
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_BUG);
302300
keys.add(InstabugCustomTextPlaceHolder.Key.REPORT_FEEDBACK);

ios/Classes/InstabugFlutterPlugin.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -402,17 +402,6 @@
402402
*/
403403
+ (void)setEmailFieldRequiredForFeatureRequests:(NSNumber *)isEmailFieldRequired forAction:(NSArray *)actionTypesArray;
404404

405-
/**
406-
* Manual invocation for chats view.
407-
*/
408-
+ (void)showChats;
409-
410-
/**
411-
* Enables and disables everything related to creating new chats.
412-
* @param isEnabled isEnabled
413-
*/
414-
+ (void)setChatsEnabled:(NSNumber *)isEnabled;
415-
416405
/**
417406
* Enables and disables everything related to receiving replies.
418407
* @param isEnabled isEnabled

ios/Classes/InstabugFlutterPlugin.m

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -678,22 +678,6 @@ + (void)setEmailFieldRequiredForFeatureRequests:(NSNumber*)isEmailFieldRequired
678678
[IBGFeatureRequests setEmailFieldRequired:boolValue forAction:actionTypes];
679679
}
680680

681-
/**
682-
* Manual invocation for chats view.
683-
*/
684-
+ (void)showChats {
685-
[IBGChats show];
686-
}
687-
688-
/**
689-
* Enables and disables everything related to creating new chats.
690-
* @param {boolean} isEnabled
691-
*/
692-
+ (void)setChatsEnabled:(NSNumber *)isEnabled {
693-
BOOL boolValue = [isEnabled boolValue];
694-
IBGChats.enabled = boolValue;
695-
}
696-
697681
/**
698682
* Enables and disables everything related to receiving replies.
699683
* @param {boolean} isEnabled
@@ -1055,7 +1039,6 @@ + (NSDictionary *)constants {
10551039
@"CustomTextPlaceHolderKey.invalidEmailMessage": kIBGInvalidEmailMessageStringName,
10561040
@"CustomTextPlaceHolderKey.invalidCommentMessage": kIBGInvalidCommentMessageStringName,
10571041
@"CustomTextPlaceHolderKey.invocationHeader": kIBGInvocationTitleStringName,
1058-
@"CustomTextPlaceHolderKey.startChats": kIBGChatsTitleStringName,
10591042
@"CustomTextPlaceHolderKey.reportQuestion": kIBGAskAQuestionStringName,
10601043
@"CustomTextPlaceHolderKey.reportBug": kIBGReportBugStringName,
10611044
@"CustomTextPlaceHolderKey.reportFeedback": kIBGReportFeedbackStringName,

lib/Chats.dart

Lines changed: 0 additions & 29 deletions
This file was deleted.

lib/Instabug.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ enum CustomTextPlaceHolderKey {
5454
invalidEmailMessage,
5555
invalidCommentMessage,
5656
invocationHeader,
57-
startChats,
5857
reportQuestion,
5958
reportBug,
6059
reportFeedback,

test/instabug_flutter_test.dart

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:flutter/services.dart';
88
import 'package:flutter_test/flutter_test.dart';
99
import 'package:instabug_flutter/APM.dart';
1010
import 'package:instabug_flutter/BugReporting.dart';
11-
import 'package:instabug_flutter/Chats.dart';
1211
import 'package:instabug_flutter/CrashReporting.dart';
1312
import 'package:instabug_flutter/FeatureRequests.dart';
1413
import 'package:instabug_flutter/Instabug.dart';
@@ -846,23 +845,6 @@ void main() {
846845
]);
847846
});
848847

849-
test('showChats Test', () async {
850-
await Chats.show();
851-
expect(log, <Matcher>[isMethodCall('showChats', arguments: null)]);
852-
});
853-
854-
test('setChatsEnabled: Test', () async {
855-
const isEnabled = false;
856-
final List<dynamic> args = <dynamic>[isEnabled];
857-
await Chats.setEnabled(isEnabled);
858-
expect(log, <Matcher>[
859-
isMethodCall(
860-
'setChatsEnabled:',
861-
arguments: args,
862-
)
863-
]);
864-
});
865-
866848
test('setRepliesEnabled: Test', () async {
867849
const isEnabled = false;
868850
final List<dynamic> args = <dynamic>[isEnabled];
@@ -1152,7 +1134,7 @@ void main() {
11521134
expect(log, <Matcher>[isMethodCall('endUITrace', arguments: null)]);
11531135
});
11541136

1155-
test('endAppLaunch: Test', () async {
1137+
test('endAppLaunch: Test', () async {
11561138
final List<dynamic> args = <dynamic>[null];
11571139
APM.endAppLaunch();
11581140
expect(log, <Matcher>[isMethodCall('endAppLaunch', arguments: null)]);

0 commit comments

Comments
 (0)