Skip to content

Commit 04ff016

Browse files
Countly warnings (#1268)
* Countly warning fix Countly warning fixes * Revert "Countly warning fix" This reverts commit 70062f2. * Countly warning fix Countly warning fixes --------- Co-authored-by: Juan Manuel Spoleti <104365141+juans-chainsafe@users.noreply.github.com>
1 parent 141614f commit 04ff016

File tree

4 files changed

+5
-22
lines changed

4 files changed

+5
-22
lines changed

Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Countly.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ private void Init(RequestBuilder requestBuilder, RequestRepository requestRepo,
358358
RegisterListenersToServices();
359359
}
360360

361-
private async void OnInitialisationComplete()
361+
private void OnInitialisationComplete()
362362
{
363363
lock (lockObj)
364364
{

Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/CountlyUtils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Plugins.CountlySDK.Helpers;
88
using Plugins.CountlySDK.Models;
99
using UnityEngine;
10+
#nullable enable
1011

1112
namespace Plugins.CountlySDK
1213
{
@@ -256,7 +257,7 @@ public bool RemoveUnsupportedDataTypes(Dictionary<string, object>? data, Countly
256257

257258
if (removed & logger != null)
258259
{
259-
logger.Warning("[Utils] Unsupported data types were removed from provided segmentation");
260+
logger?.Warning("[Utils] Unsupported data types were removed from provided segmentation");
260261
}
261262

262263
return removed;

Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Models/CountlyConfiguration.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,123 +16,103 @@ public class CountlyConfiguration
1616
/// URL of the Countly server to submit data to.
1717
/// Mandatory field.
1818
/// </summary>
19-
[Obsolete("ServerUrl is deprecated. Use CountlyConfiguration(string appKey, string serverUrl) instead.")]
2019
public string ServerUrl = null;
2120

2221
/// <summary>
2322
/// App key for the application being tracked.
2423
/// Mandatory field.
2524
/// </summary>
26-
[Obsolete("AppKey is deprecated. Use CountlyConfiguration(string appKey, string serverUrl) instead.")]
2725
public string AppKey = null;
2826

2927
/// <summary>
3028
/// Unique ID for the device the app is running on.
3129
/// </summary>
32-
[Obsolete("DeviceId is deprecated. Use SetDeviceId(string deviceId) instead.")]
3330
public string DeviceId = null;
3431

3532
/// <summary>
3633
/// Set to prevent parameter tampering.
3734
/// </summary>
38-
[Obsolete("Salt is deprecated. Use SetParameterTamperingProtectionSalt(string salt) instead.")]
3935
public string Salt = null;
4036

4137
/// <summary>
4238
/// Set to send all requests made to the Countly server using HTTP POST.
4339
/// </summary>
44-
[Obsolete("EnablePost is deprecated. Use EnableForcedHttpPost() instead.")]
4540
public bool EnablePost = false;
4641

4742
/// <summary>
4843
/// Set to true if you want the SDK to pretend that it's functioning.
4944
/// </summary>
50-
[Obsolete("EnableTestMode is deprecated. This is going to be removed in the future.")]
5145
public bool EnableTestMode = false;
5246

5347
/// <summary>
5448
/// Set to true if you want to enable countly internal debugging logs.
5549
/// </summary>
56-
[Obsolete("EnableConsoleLogging is deprecated. Use EnableLogging() instead.")]
5750
public bool EnableConsoleLogging = false;
5851

5952
/// <summary>
6053
/// Set mode of push notification.
6154
/// </summary>
62-
[Obsolete("NotificationMode is deprecated. Use SetNotificationMode(TestMode mode) instead.")]
6355
public TestMode NotificationMode = TestMode.None;
6456

6557
/// <summary>
6658
/// Set to true to enable manual session handling.
6759
/// </summary>
68-
[Obsolete("EnableManualSessionHandling is deprecated. This is going to be removed in the future.")]
6960
public readonly bool EnableManualSessionHandling = false;
7061

7162
/// <summary>
7263
/// Sets the interval for the automatic update calls
7364
/// min value 1 (1 second), max value 600 (10 minutes)
7465
/// </summary>
75-
[Obsolete("SessionDuration is deprecated. Use SetUpdateSessionTimerDelay(int duration) instead.")]
7666
public int SessionDuration = 60;
7767

7868
/// <summary>
7969
/// Maximum size of all string keys
8070
/// </summary>
81-
[Obsolete("MaxKeyLength is deprecated. Use SetMaxKeyLength(int length) instead.")]
8271
public int MaxKeyLength = 128;
8372

8473
/// <summary>
8574
/// Maximum size of all values in our key-value pairs
8675
/// </summary>
87-
[Obsolete("MaxValueSize is deprecated. Use SetMaxValueSize(int size) instead.")]
8876
public int MaxValueSize = 256;
8977

9078
/// <summary>
9179
/// Max amount of custom (dev provided) segmentation in one event
9280
/// </summary>
93-
[Obsolete("MaxSegmentationValues is deprecated. Use SetMaxSegmentationValues(int values) instead.")]
9481
public int MaxSegmentationValues = 100;
9582

9683
/// <summary>
9784
/// Limits how many stack trace lines would be recorded per thread
9885
/// </summary>
99-
[Obsolete("MaxStackTraceLinesPerThread is deprecated. Use SetMaxStackTraceLinesPerThread(int lines) instead.")]
10086
public int MaxStackTraceLinesPerThread = 30;
10187

10288
/// <summary>
10389
/// Limits how many characters are allowed per stack trace line
10490
/// </summary>
105-
[Obsolete("MaxStackTraceLineLength is deprecated. Use SetMaxStackTraceLineLength(int length) instead.")]
10691
public int MaxStackTraceLineLength = 200;
10792

10893
/// <summary>
10994
/// Set threshold value for the number of events that can be stored locally.
11095
/// </summary>
111-
[Obsolete("EventQueueThreshold is deprecated. Use SetEventQueueSizeToSend(int threshold) instead.")]
11296
public int EventQueueThreshold = 100;
11397

11498
/// <summary>
11599
/// Set limit for the number of requests that can be stored locally.
116100
/// </summary>
117-
[Obsolete("StoredRequestLimit is deprecated. Use SetMaxRequestQueueSize(int limit) instead.")]
118101
public int StoredRequestLimit = 1000;
119102

120103
/// <summary>
121104
/// Set the maximum amount of breadcrumbs.
122105
/// </summary>
123-
[Obsolete("TotalBreadcrumbsAllowed is deprecated. Use SetMaxBreadcrumbCount(int amount) instead.")]
124106
public int TotalBreadcrumbsAllowed = 100;
125107

126108
/// <summary>
127109
/// Set true to enable uncaught crash reporting.
128110
/// </summary>
129-
[Obsolete("EnableAutomaticCrashReporting is deprecated. Use DisableAutomaticCrashReporting() instead.")]
130111
public bool EnableAutomaticCrashReporting = true;
131112

132113
/// <summary>
133114
/// Set if consent should be required.
134115
/// </summary>
135-
[Obsolete("RequiresConsent is deprecated. Use SetRequiresConsent(bool enable) instead.")]
136116
public bool RequiresConsent = false;
137117

138118
internal SafeIDGenerator SafeViewIDGenerator = null;

Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Models/TimeMetricModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ internal static TimeMetricModel GetTimeZoneInfoForRequest()
6363
{
6464
Hour = currentDateTime.TimeOfDay.Hours,
6565
DayOfWeek = (int)currentDateTime.DayOfWeek,
66+
#pragma warning disable CS0618 // Type or member is obsolete
6667
Timezone = TimeZone.CurrentTimeZone.GetUtcOffset(currentDateTime).TotalMinutes.ToString(CultureInfo.InvariantCulture)
68+
#pragma warning restore CS0618 // Type or member is obsolete
6769
};
6870

6971
model.Timestamp = model.GetUniqueMilliSecTimeStamp(currentDateTime);

0 commit comments

Comments
 (0)