Skip to content

Commit

Permalink
remove offline config for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
chungdaniel committed Jan 8, 2025
1 parent 1c7a8e7 commit 52c0e96
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ class AmplitudeFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
call.argument<Boolean>("useAdvertisingIdForDeviceId")
?.let { configuration.useAdvertisingIdForDeviceId = it }
call.argument<Boolean>("useAppSetIdForDeviceId")?.let { configuration.useAppSetIdForDeviceId = it }
call.argument<Boolean>("offline")?.let { configuration.offline = it }

return configuration
}
Expand Down
3 changes: 0 additions & 3 deletions ios/Classes/SwiftAmplitudeFlutterPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ import AmplitudeSwift
screenViews: screenViews
)
}
if let offline = args["offline"] as? Bool {
configuration.offline = offline
}

return configuration
}
Expand Down
7 changes: 0 additions & 7 deletions lib/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ class Configuration {
int minTimeBetweenSessionsMillis;
/// Applicable to all platforms (iOS, Android, Web)
///
/// Whether the SDK connects to the network.
/// Check platform-specific documentation for more information.
bool offline;
/// Applicable to all platforms (iOS, Android, Web)
///
/// Configures tracking of extra properties.
/// Check platform-specific documentation for more information.
TrackingOptions trackingOptions;
Expand Down Expand Up @@ -193,7 +188,6 @@ class Configuration {
this.identityStorage = 'cookie',
this.userId,
this.transport = 'fetch',
this.offline = false,
this.fetchRemoteConfig = false,
}): trackingOptions = trackingOptions ?? TrackingOptions(),
cookieOptions = cookieOptions ?? CookieOptions() {
Expand Down Expand Up @@ -231,7 +225,6 @@ class Configuration {
'sessionTimeout': minTimeBetweenSessionsMillis != Constants.minTimeBetweenSessionsMillisUnset ? minTimeBetweenSessionsMillis : Constants.minTimeBetweenSessionsMillisForWeb,
'userId': userId,
'transport': transport,
'offline': offline,
'fetchRemoteConfig': fetchRemoteConfig,
// This field doesn't belong to Configuration
// Pass it for FlutterLibraryPlugin
Expand Down
1 change: 0 additions & 1 deletion test/amplitude_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ void main() {
'sessionTimeout': 30 * 60 * 1000,
'userId': null,
'transport': 'fetch',
'offline': false,
'fetchRemoteConfig': false,
// This field doesn't belong to Configuration
// Pass it for FlutterLibraryPlugin
Expand Down
4 changes: 0 additions & 4 deletions test/configuration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ void main() {
expect(config.serverZone, ServerZone.us);
expect(config.serverUrl, isNull);
expect(config.minTimeBetweenSessionsMillis, Constants.minTimeBetweenSessionsMillisUnset);
expect(config.offline, false);
expect(config.trackingOptions, isA<TrackingOptions>());
expect(config.defaultTracking, isA<DefaultTrackingOptions>());
expect(config.enableCoppaControl, false);
Expand Down Expand Up @@ -56,7 +55,6 @@ void main() {
expect(map['serverUrl'], isNull);
expect(map['minTimeBetweenSessionsMillis'], Constants.minTimeBetweenSessionsMillisForMobile);
expect(map['sessionTimeout'], Constants.minTimeBetweenSessionsMillisForWeb);
expect(map['offline'], false);
expect(map.containsKey('trackingOptions'), true);
expect(map.containsKey('defaultTracking'), true);
expect(map['enableCoppaControl'], false);
Expand Down Expand Up @@ -90,7 +88,6 @@ void main() {
serverZone: ServerZone.eu,
serverUrl: 'https://custom.server.url',
minTimeBetweenSessionsMillis: 2000,
offline: true,
trackingOptions: TrackingOptions(language: false),
defaultTracking: DefaultTrackingOptions(sessions: false),
enableCoppaControl: true,
Expand Down Expand Up @@ -121,7 +118,6 @@ void main() {
expect(customConfig.serverZone, ServerZone.eu);
expect(customConfig.serverUrl, 'https://custom.server.url');
expect(customConfig.minTimeBetweenSessionsMillis, 2000);
expect(customConfig.offline, true);
expect(customConfig.trackingOptions.language, false);
expect(customConfig.defaultTracking.sessions, false);
expect(customConfig.enableCoppaControl, true);
Expand Down

0 comments on commit 52c0e96

Please sign in to comment.