From f1a00aeb7f4445067a16d711c084d8d0335ea947 Mon Sep 17 00:00:00 2001 From: Natalie Bunduwongse Date: Mon, 6 May 2024 16:48:11 +0700 Subject: [PATCH] fix: nullables not working for unity 2019 --- .../Passport/Runtime/Scripts/Private/Event/AnalyticsEvent.cs | 2 +- src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs | 4 ++-- src/Packages/Passport/Tests/Runtime/Scripts/PassportTests.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Packages/Passport/Runtime/Scripts/Private/Event/AnalyticsEvent.cs b/src/Packages/Passport/Runtime/Scripts/Private/Event/AnalyticsEvent.cs index 18bc2e66..1f22139a 100644 --- a/src/Packages/Passport/Runtime/Scripts/Private/Event/AnalyticsEvent.cs +++ b/src/Packages/Passport/Runtime/Scripts/Private/Event/AnalyticsEvent.cs @@ -42,7 +42,7 @@ public static class Properties } public async UniTask Track(IBrowserCommunicationsManager communicationsManager, string eventName, - bool? success = null, Dictionary? properties = null) + bool? success = null, Dictionary properties = null) { try { diff --git a/src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs b/src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs index be1119a5..8fcd74d8 100644 --- a/src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs +++ b/src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs @@ -22,7 +22,7 @@ public class PassportImpl { private const string TAG = "[Passport Implementation]"; public readonly IBrowserCommunicationsManager communicationsManager; - private PassportAnalytics analytics = new(); + private PassportAnalytics analytics = new PassportAnalytics(); // Used for device code auth private DeviceConnectResponse deviceConnectResponse; @@ -829,7 +829,7 @@ public void ClearStorage() } #endif - protected virtual async void Track(string eventName, bool? success = null, Dictionary? properties = null) + protected virtual async void Track(string eventName, bool? success = null, Dictionary properties = null) { await analytics.Track(communicationsManager, eventName, success, properties); } diff --git a/src/Packages/Passport/Tests/Runtime/Scripts/PassportTests.cs b/src/Packages/Passport/Tests/Runtime/Scripts/PassportTests.cs index b87828b0..463cd4c5 100644 --- a/src/Packages/Passport/Tests/Runtime/Scripts/PassportTests.cs +++ b/src/Packages/Passport/Tests/Runtime/Scripts/PassportTests.cs @@ -24,7 +24,7 @@ protected override void OpenUrl(string url) urlsOpened.Add(url); } - protected override void Track(string eventName, bool? success = null, Dictionary? properties = null) + protected override void Track(string eventName, bool? success = null, Dictionary properties = null) { } }