Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MC-1969 fixes #86

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

MC-1969 fixes #86

wants to merge 3 commits into from

Conversation

AlokKumar-CT
Copy link
Contributor

Implement ARP
Implement discarded events handling
Added UnityCoreState in UnityNativeNetworkEngine

@AlokKumar-CT AlokKumar-CT changed the title Feature mc 1969 MC-1969 fixes Sep 4, 2024
}

public void SetDouble(string key, string doubleValue)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set double should accept a double value

{
return double.Parse(PlayerPrefs.GetString(GetStorageKey(key), defaultValue.ToString(CultureInfo.InvariantCulture)));
}
public void SetBool(string key, int value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set bool should use a bool value as parameter.

Add new line before method.

@@ -1,6 +1,6 @@
#if (!UNITY_IOS && !UNITY_ANDROID) || UNITY_EDITOR
namespace CleverTapSDK.Native {
internal class UnityNativeValidationResult {
public class UnityNativeValidationResult {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not fixed.

@@ -0,0 +1,130 @@
using System;
using System.Collections.Generic;
using CleverTapSDK.Native;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused namespace.

}
catch (Exception t)
{
CleverTapLogger.Log("Error handling discarded events response: " + t.StackTrace);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 't' is still unused and the exception details not logged.

private Coroutine timerCoroutine;

internal UnityNativeBaseEventQueue(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine, int queueLimit = 49, int defaultTimerInterval = 1)
internal UnityNativeBaseEventQueue(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine,UnityNativeEventValidator eventValidator, int queueLimit = 49, int defaultTimerInterval = 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventValidator is not needed since it is unused.

internal UnityNativeEventBuilder(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine) {
private UnityNativeEventValidator _eventValidator;

internal UnityNativeEventBuilder(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine, UnityNativeEventValidator eventValidator) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventValidator is unused, so it is not needed

@@ -9,12 +9,12 @@ internal class UnityNativeEventQueueManager {
private readonly UnityNativeBaseEventQueue _userEventsQueue;
private readonly UnityNativeBaseEventQueue _raisedEventsQueue;

internal UnityNativeEventQueueManager(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine, UnityNativeDatabaseStore databaseStore) {
internal UnityNativeEventQueueManager(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine, UnityNativeDatabaseStore databaseStore, UnityNativeEventValidator eventValidator) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need an eventValidator here? It is not needed by the queues so it is not really used.

@@ -7,7 +7,7 @@ internal class UnityNativeUserEventQueue : UnityNativeBaseEventQueue {

protected override string QueueName => "USER_EVENTS";

internal UnityNativeUserEventQueue(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine, int queueLimit = 49, int defaultTimerInterval = 1) : base(coreState, networkEngine, queueLimit, defaultTimerInterval) { }
internal UnityNativeUserEventQueue(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine, UnityNativeEventValidator eventValidator, int queueLimit = 49, int defaultTimerInterval = 1) : base(coreState, networkEngine, eventValidator, queueLimit, defaultTimerInterval) { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventValidor is unused, remove it.

@@ -8,7 +8,8 @@ internal class UnityNativeRaisedEventQueue : UnityNativeBaseEventQueue {

protected override string QueueName => "RAISED_EVENTS";

internal UnityNativeRaisedEventQueue(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine, int queueLimit = 49, int defaultTimerInterval = 1) : base(coreState, networkEngine, queueLimit, defaultTimerInterval) { }
internal UnityNativeRaisedEventQueue(UnityNativeCoreState coreState, UnityNativeNetworkEngine networkEngine, UnityNativeEventValidator eventValidator, int queueLimit = 49, int defaultTimerInterval = 1) :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The eventValidator seems unused here. Why do we need it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants