Skip to content

Commit

Permalink
removed connection error reason references from the code
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Feb 22, 2024
1 parent 77a97e6 commit 62f4c80
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public AblyMethodCallHandler(final MethodChannel methodChannel,
_map.put(PlatformConstants.PlatformMethod.connectionId, this::connectionId);
_map.put(PlatformConstants.PlatformMethod.connectionKey, this::connectionKey);
_map.put(PlatformConstants.PlatformMethod.connectionRecoveryKey, this::connectionRecoveryKey);
_map.put(PlatformConstants.PlatformMethod.connectionErrorReason, this::connectionErrorReason);

// Push Notifications
_map.put(PlatformConstants.PlatformMethod.pushActivate, this::pushActivate);
Expand Down Expand Up @@ -582,13 +581,6 @@ private void connectionRecoveryKey(@NonNull MethodCall methodCall, @NonNull Meth
AblyRealtime realtime = instanceStore.getRealtime(ablyMessage.handle);
result.success(realtime.connection.recoveryKey);
}

private void connectionErrorReason(@NonNull MethodCall methodCall, @NonNull MethodChannel.Result result) {
final AblyFlutterMessage ablyMessage = (AblyFlutterMessage) methodCall.arguments;
AblyRealtime realtime = instanceStore.getRealtime(ablyMessage.handle);
result.success(realtime.connection.reason);
}

private void time(@NonNull MethodChannel.Result result, AblyBase client) {
Callback<Long> callback = new Callback<Long>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ static final public class PlatformMethod {
public static final String connectionId = "connectionId";
public static final String connectionKey = "connectionKey";
public static final String connectionRecoveryKey = "connectionRecoveryKey";
public static final String connectionErrorReason = "connectionErrorReason";

public static final String pushActivate = "pushActivate";
public static final String pushDeactivate = "pushDeactivate";
Expand Down
9 changes: 0 additions & 9 deletions ios/Classes/AblyFlutter.m
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,6 @@ -(void)reset;
result(connectionKey);
};

static const FlutterHandler _connectionErrorReason = ^void(AblyFlutter *const ably, FlutterMethodCall *const call, const FlutterResult result) {
AblyFlutterMessage *const ablyMessage = call.arguments;
AblyInstanceStore *const instanceStore = [ably instanceStore];
ARTRealtime *const realtime = [instanceStore realtimeFrom:ablyMessage.handle];
ARTErrorInfo* connectionError = [realtime.connection errorReason];
result(connectionError);
};

static const FlutterHandler _connectionRecoveryKey = ^void(AblyFlutter *const ably, FlutterMethodCall *const call, const FlutterResult result) {
AblyFlutterMessage *const ablyMessage = call.arguments;
AblyInstanceStore *const instanceStore = [ably instanceStore];
Expand Down Expand Up @@ -776,7 +768,6 @@ -(instancetype)initWithChannel:(FlutterMethodChannel *const)channel
AblyPlatformMethod_connectionId:_connectionId,
AblyPlatformMethod_connectionKey:_connectionKey,
AblyPlatformMethod_connectionRecoveryKey:_connectionRecoveryKey,
AblyPlatformMethod_connectionErrorReason:_connectionErrorReason,
// Push Notifications
AblyPlatformMethod_pushActivate: PushHandlers.activate,
AblyPlatformMethod_pushRequestPermission: PushHandlers.requestPermission,
Expand Down
1 change: 0 additions & 1 deletion ios/Classes/codec/AblyPlatformConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ extern NSString *const AblyPlatformMethod_realtimeAuthGetClientId;
extern NSString *const AblyPlatformMethod_connectionId;
extern NSString *const AblyPlatformMethod_connectionKey;
extern NSString *const AblyPlatformMethod_connectionRecoveryKey;
extern NSString *const AblyPlatformMethod_connectionErrorReason;

extern NSString *const AblyPlatformMethod_pushActivate;
extern NSString *const AblyPlatformMethod_pushDeactivate;
Expand Down
1 change: 0 additions & 1 deletion ios/Classes/codec/AblyPlatformConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
NSString *const AblyPlatformMethod_connectionId = @"connectionId";
NSString *const AblyPlatformMethod_connectionKey = @"connectionKey";
NSString *const AblyPlatformMethod_connectionRecoveryKey = @"connectionRecoveryKey";
NSString *const AblyPlatformMethod_connectionErrorReason = @"connectionErrorReason";

NSString *const AblyPlatformMethod_pushActivate= @"pushActivate";
NSString *const AblyPlatformMethod_pushDeactivate= @"pushDeactivate";
Expand Down
1 change: 0 additions & 1 deletion lib/src/generated/platform_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class PlatformMethod {
static const String connectionId = 'connectionId';
static const String connectionKey = 'connectionKey';
static const String connectionRecoveryKey = 'connectionRecoveryKey';
static const String connectionErrorReason = 'connectionErrorReason';

static const String pushActivate = 'pushActivate';
static const String pushDeactivate = 'pushDeactivate';
Expand Down

0 comments on commit 62f4c80

Please sign in to comment.