diff --git a/.github/workflows/pr-comment-warnings.yml b/.github/workflows/pr-comment-warnings.yml
index 8df51429544..7f847aa8c04 100644
--- a/.github/workflows/pr-comment-warnings.yml
+++ b/.github/workflows/pr-comment-warnings.yml
@@ -2,12 +2,19 @@
---
name: Comment Warning Ratchet on PR
-# Runs in the trusted base-repo context after the (possibly fork) "Unity Test"
-# run completes, so it can comment with write permissions without exposing them
-# to the untrusted lint job. Mirrors pr-comment-artifact-url.yml.
+# Runs in the trusted base-repo context alongside the (possibly fork) "Unity Test"
+# workflow, so it can comment with write permissions without exposing them to the
+# untrusted lint job. Mirrors pr-comment-artifact-url.yml.
+#
+# 'requested' -> post a "Lint pending" banner the moment Unity Test starts, so a
+# stale Passed/Blocked banner from a previous run never lingers.
+# 'completed' -> ALWAYS refresh the banner: Passed / Blocked / Skipped (no C#
+# changes) / Unavailable (lint did not finish). Keyed on the hidden
+# marker so every state edits the same comment.
on:
workflow_run:
types:
+ - "requested"
- "completed"
workflows:
- "Unity Test"
@@ -18,7 +25,50 @@ permissions:
pull-requests: write
jobs:
+ pending:
+ if: github.event.action == 'requested' && github.event.workflow_run.event == 'pull_request'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Resolve PR number
+ id: pr
+ env:
+ WORKFLOW_RUN_EVENT_OBJ: ${{ toJSON(github.event.workflow_run) }}
+ run: |
+ PR_NUMBER=$(jq -r '.pull_requests[0].number' <<< "$WORKFLOW_RUN_EVENT_OBJ")
+ echo "PR number: $PR_NUMBER"
+ if [[ -z "$PR_NUMBER" || "$PR_NUMBER" == "null" ]]; then
+ echo "No PR associated with this run, skipping."
+ echo "pr-number=" >> "$GITHUB_OUTPUT"
+ else
+ echo "pr-number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Find existing comment
+ if: steps.pr.outputs.pr-number != ''
+ uses: peter-evans/find-comment@v2
+ id: find-comment
+ with:
+ issue-number: ${{ steps.pr.outputs.pr-number }}
+ comment-author: 'github-actions[bot]'
+ body-includes: ''
+
+ - name: Upsert pending banner
+ if: steps.pr.outputs.pr-number != ''
+ uses: peter-evans/create-or-update-comment@v3
+ with:
+ issue-number: ${{ steps.pr.outputs.pr-number }}
+ comment-id: ${{ steps.find-comment.outputs.comment-id }}
+ edit-mode: replace
+ body: |-
+
+ ![badge]
+
+ Lint in progress, come back later!
+
+ [badge]: https://img.shields.io/badge/Lint-Pending!-ffff00?logo=github&style=for-the-badge
+
comment:
+ if: github.event.action == 'completed'
runs-on: ubuntu-latest
steps:
- name: Resolve PR number
@@ -50,7 +100,7 @@ jobs:
id: result
run: |
if [ ! -f warning-result.json ]; then
- echo "No warning-result.json found, skipping."
+ echo "No warning-result.json found, treating as absent."
echo "found=false" >> "$GITHUB_OUTPUT"
exit 0
fi
@@ -62,52 +112,86 @@ jobs:
echo "baseline=$baseline" >> "$GITHUB_OUTPUT"
echo "allow-equal=$allow_equal" >> "$GITHUB_OUTPUT"
+ # Always compose a body, even when the artifact is absent (lint skipped or the
+ # Unity Test run failed before counting), so the banner never goes stale.
- name: Compose comment body
- if: steps.result.outputs.found == 'true'
+ if: steps.pr.outputs.pr-number != ''
id: body
env:
+ FOUND: ${{ steps.result.outputs.found }}
COUNT: ${{ steps.result.outputs.count }}
BASELINE: ${{ steps.result.outputs.baseline }}
ALLOW_EQUAL: ${{ steps.result.outputs.allow-equal }}
+ CONCLUSION: ${{ github.event.workflow_run.conclusion }}
+ RUN_URL: ${{ github.event.workflow_run.html_url }}
run: |
DELIM="EOF_$(uuidgen)"
- {
- echo "body<<$DELIM"
- echo ""
- blocked=false
+ LOGO='
'
+ BADGE_STYLE="?logo=github&style=for-the-badge"
+ DETAILS=""
+
+ if [ "$FOUND" != "true" ]; then
+ if [ "$CONCLUSION" = "success" ]; then
+ BADGE="https://img.shields.io/badge/Lint-Skipped-lightgrey${BADGE_STYLE}"
+ MSG="No C# files changed — lint ratchet skipped."
+ elif [ "$CONCLUSION" = "skipped" ]; then
+ BADGE="https://img.shields.io/badge/Lint-Skipped-lightgrey${BADGE_STYLE}"
+ MSG="Lint ratchet not evaluated for this run."
+ else
+ BADGE="https://img.shields.io/badge/Lint-Unavailable-ff0000${BADGE_STYLE}"
+ MSG="Lint did not finish (\`${CONCLUSION}\`) — the warning ratchet could not be evaluated. [See logs](${RUN_URL})."
+ fi
+ else
if [ -z "$BASELINE" ]; then
- echo "**Warnings counted: $COUNT** (no baseline established yet)"
+ MSG="**Warnings counted: $COUNT** (no baseline established yet)"
+ BADGE="https://img.shields.io/badge/Lint-Passed!-3fb950${BADGE_STYLE}"
elif [ "$COUNT" -lt "$BASELINE" ]; then
- echo "**Warnings count reduced: $BASELINE => $COUNT**"
+ MSG="**Warnings count reduced: $BASELINE => $COUNT**"
+ BADGE="https://img.shields.io/badge/Lint-Passed!-3fb950${BADGE_STYLE}"
elif [ "$ALLOW_EQUAL" = "true" ] && [ "$COUNT" -eq "$BASELINE" ]; then
- echo "**Warnings unchanged: $BASELINE => $COUNT** — allowed on release/hotfix branches."
+ MSG="**Warnings unchanged: $BASELINE => $COUNT** — allowed on release/hotfix branches."
+ BADGE="https://img.shields.io/badge/Lint-Passed!-3fb950${BADGE_STYLE}"
else
- echo "**Warnings not reduced: $BASELINE => $COUNT** — remove at least one warning to merge."
- blocked=true
+ MSG="**Warnings not reduced: $BASELINE => $COUNT** — remove at least one warning to merge."
+ BADGE="https://img.shields.io/badge/Lint-Blocked!-ff0000${BADGE_STYLE}"
fi
- # Always list the warnings/errors in files this PR changed, collapsed by default.
+ # List the warnings/errors in files this PR changed, collapsed by default.
total=$(jq -r '.pr_findings_total // 0' warning-result.json)
if [ "$total" -gt 0 ]; then
- echo ""
- echo "Warnings/errors in files changed by this PR ($total)
"
- echo ""
- echo '```'
- jq -r '.pr_findings[] | "\(.file):\(.line) \(.rule) \(.message | gsub("[\r\n]"; " "))"' warning-result.json
- shown=$(jq -r '.pr_findings | length' warning-result.json)
- if [ "$total" -gt "$shown" ]; then
+ {
echo ""
- echo "…and $((total - shown)) more (see the csharp-lint-reports artifact)."
- fi
- echo '```'
- echo ""
- echo " "
+ echo "Warnings/errors in files changed by this PR ($total)
"
+ echo ""
+ echo '```'
+ jq -r '.pr_findings[] | "\(.file):\(.line) \(.rule) \(.message | gsub("[\r\n]"; " "))"' warning-result.json
+ shown=$(jq -r '.pr_findings | length' warning-result.json)
+ if [ "$total" -gt "$shown" ]; then
+ echo ""
+ echo "…and $((total - shown)) more (see the csharp-lint-reports artifact)."
+ fi
+ echo '```'
+ echo ""
+ echo " "
+ } > details.md
+ DETAILS="details.md"
fi
+ fi
+
+ {
+ echo "body<<$DELIM"
+ echo ""
+ echo "![badge] $LOGO"
+ echo ""
+ echo "$MSG"
+ [ -n "$DETAILS" ] && cat "$DETAILS"
+ echo ""
+ echo "[badge]: $BADGE"
echo "$DELIM"
} >> "$GITHUB_OUTPUT"
- name: Find existing comment
- if: steps.result.outputs.found == 'true'
+ if: steps.pr.outputs.pr-number != ''
uses: peter-evans/find-comment@v2
id: find-comment
with:
@@ -116,7 +200,7 @@ jobs:
body-includes: ''
- name: Upsert comment
- if: steps.result.outputs.found == 'true'
+ if: steps.pr.outputs.pr-number != ''
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ steps.pr.outputs.pr-number }}
diff --git a/Explorer/.editorconfig b/Explorer/.editorconfig
index 29d1f720dbe..ae11f6c248e 100644
--- a/Explorer/.editorconfig
+++ b/Explorer/.editorconfig
@@ -61,7 +61,6 @@ dotnet_naming_rule.interfaces_should_be_pascal_case_with_i_prefix.symbols = inte
dotnet_naming_rule.interfaces_should_be_pascal_case_with_i_prefix.style = i_prefix_pascal_case_style
dotnet_naming_rule.interfaces_should_be_pascal_case_with_i_prefix.severity = warning
-
#### CAPITALS_SNAKE_CASE ####
dotnet_naming_style.capital_snake_case_style.capitalization = all_upper
diff --git a/Explorer/Assets/DCL/ApplicationGuards/ApplicationBlocklistGuard/ApplicationBlocklistGuard.cs b/Explorer/Assets/DCL/ApplicationGuards/ApplicationBlocklistGuard/ApplicationBlocklistGuard.cs
index 6b56e795fd9..1d47734aabd 100644
--- a/Explorer/Assets/DCL/ApplicationGuards/ApplicationBlocklistGuard/ApplicationBlocklistGuard.cs
+++ b/Explorer/Assets/DCL/ApplicationGuards/ApplicationBlocklistGuard/ApplicationBlocklistGuard.cs
@@ -15,7 +15,7 @@ public static class ApplicationBlocklistGuard
{
public static async UniTask IsUserBlocklistedAsync(IWebRequestController webRequestController, IDecentralandUrlsSource urlsSource, string userID, ModerationDataProvider moderationDataProvider, CancellationToken ct)
{
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.REPORT_USER))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.ReportUser))
{
var result = await moderationDataProvider.GetBanStatusAsync(userID, ct)
.SuppressToResultAsync(ReportCategory.STARTUP);
diff --git a/Explorer/Assets/DCL/ApplicationGuards/ApplicationBlocklistGuard/BlockedScreenController.cs b/Explorer/Assets/DCL/ApplicationGuards/ApplicationBlocklistGuard/BlockedScreenController.cs
index 8d5f38547f0..3be6839afa4 100644
--- a/Explorer/Assets/DCL/ApplicationGuards/ApplicationBlocklistGuard/BlockedScreenController.cs
+++ b/Explorer/Assets/DCL/ApplicationGuards/ApplicationBlocklistGuard/BlockedScreenController.cs
@@ -17,7 +17,7 @@ public class BlockedScreenController : ControllerBase CanvasOrdering.SortingLayer.OVERLAY;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Overlay;
public BlockedScreenController(ViewFactoryMethod viewFactory, UnityAppWebBrowser webBrowser) : base(viewFactory)
{
diff --git a/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/Data/SpecProfile.cs b/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/Data/SpecProfile.cs
index 5d29ae99869..d30951ade22 100644
--- a/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/Data/SpecProfile.cs
+++ b/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/Data/SpecProfile.cs
@@ -4,11 +4,11 @@ namespace DCL.ApplicationGuards
{
public enum SpecCategory
{
- OS,
- CPU,
- GPU,
- VRAM,
- RAM,
+ Os,
+ Cpu,
+ Gpu,
+ Vram,
+ Ram,
Storage,
ComputeShaders
}
diff --git a/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/Logic/MinimumSpecsGuard.cs b/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/Logic/MinimumSpecsGuard.cs
index fc26b043d2b..ad3af173261 100644
--- a/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/Logic/MinimumSpecsGuard.cs
+++ b/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/Logic/MinimumSpecsGuard.cs
@@ -71,11 +71,11 @@ private List Evaluate()
// OS
string os = systemInfoProvider.OperatingSystem;
- results.Add(new SpecResult(SpecCategory.OS, profile.OsCheck(os), profile.OsRequirement, os));
+ results.Add(new SpecResult(SpecCategory.Os, profile.OsCheck(os), profile.OsRequirement, os));
// CPU
string cpu = systemInfoProvider.ProcessorType;
- results.Add(new SpecResult(SpecCategory.CPU, profile.CpuCheck(cpu), profile.CpuRequirement, cpu));
+ results.Add(new SpecResult(SpecCategory.Cpu, profile.CpuCheck(cpu), profile.CpuRequirement, cpu));
// GPU
string gpuName = systemInfoProvider.GraphicsDeviceName;
@@ -93,7 +93,7 @@ private List Evaluate()
string actualGpuDisplayString = $"{gpuName}".Trim();
results.Add(new SpecResult(
- SpecCategory.GPU,
+ SpecCategory.Gpu,
isGpuSpecMet,
gpuRequirementMessage,
actualGpuDisplayString
@@ -106,7 +106,7 @@ private List Evaluate()
// NOTE: e.g., shows "16 GB" not "15.7 GB"
string actualVramDisplay = $"{roundedActualVramGB} GB";
- results.Add(new SpecResult(SpecCategory.VRAM, isVramMet, profile.VramRequirement, actualVramDisplay));
+ results.Add(new SpecResult(SpecCategory.Vram, isVramMet, profile.VramRequirement, actualVramDisplay));
// RAM
int actualRamMB = systemInfoProvider.SystemMemorySize;
@@ -115,7 +115,7 @@ private List Evaluate()
// NOTE: e.g., shows "16 GB" not "15.7 GB"
string actualRamDisplay = $"{roundedActualRamGB} GB";
- results.Add(new SpecResult(SpecCategory.RAM, isRamMet, profile.RamRequirement, actualRamDisplay));
+ results.Add(new SpecResult(SpecCategory.Ram, isRamMet, profile.RamRequirement, actualRamDisplay));
try
{
diff --git a/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/UI/InsufficientDiskSpaceScreenController.cs b/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/UI/InsufficientDiskSpaceScreenController.cs
index 3293291d6d2..11aaef47538 100644
--- a/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/UI/InsufficientDiskSpaceScreenController.cs
+++ b/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/UI/InsufficientDiskSpaceScreenController.cs
@@ -8,7 +8,7 @@ namespace DCL.ApplicationGuards
public class InsufficientDiskSpaceScreenController : ControllerBase
{
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.OVERLAY;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Overlay;
public InsufficientDiskSpaceScreenController(ViewFactoryMethod viewFactory) : base(viewFactory) { }
diff --git a/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/UI/MinimumSpecsScreenController.cs b/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/UI/MinimumSpecsScreenController.cs
index 874352d7c3a..9d6b09cd9d4 100644
--- a/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/UI/MinimumSpecsScreenController.cs
+++ b/Explorer/Assets/DCL/ApplicationGuards/ApplicationMinimumSpecsGuard/UI/MinimumSpecsScreenController.cs
@@ -14,7 +14,7 @@ public class MinimumSpecsScreenController : ControllerBase specResult;
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.OVERLAY;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Overlay;
public readonly UniTaskCompletionSource HoldingTask;
private MinimumSpecsTablePresenter specsTablePresenter;
diff --git a/Explorer/Assets/DCL/ApplicationGuards/ApplicationVersionGuard/LauncherRedirectionScreenController.cs b/Explorer/Assets/DCL/ApplicationGuards/ApplicationVersionGuard/LauncherRedirectionScreenController.cs
index 2d9a5ac730c..ac081ea8520 100644
--- a/Explorer/Assets/DCL/ApplicationGuards/ApplicationVersionGuard/LauncherRedirectionScreenController.cs
+++ b/Explorer/Assets/DCL/ApplicationGuards/ApplicationVersionGuard/LauncherRedirectionScreenController.cs
@@ -14,7 +14,7 @@ public class LauncherRedirectionScreenController : ControllerBase CanvasOrdering.SortingLayer.OVERLAY;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Overlay;
public LauncherRedirectionScreenController(ApplicationVersionGuard versionGuard, ViewFactoryMethod viewFactory, string current, string latest) : base(viewFactory)
{
diff --git a/Explorer/Assets/DCL/AssetsProvision/AssetSource.cs b/Explorer/Assets/DCL/AssetsProvision/AssetSource.cs
index 02c6c9d6749..96d6f2766f2 100644
--- a/Explorer/Assets/DCL/AssetsProvision/AssetSource.cs
+++ b/Explorer/Assets/DCL/AssetsProvision/AssetSource.cs
@@ -10,27 +10,27 @@ namespace AssetManagement
[Flags]
public enum AssetSource
{
- NONE = 0,
+ None = 0,
///
/// From the resources bundled at build time
///
- EMBEDDED = 1,
+ Embedded = 1,
///
/// Downloaded over network
///
- WEB = 1 << 1,
+ Web = 1 << 1,
///
/// Downloaded over Addressables
///
- ADDRESSABLE = 1 << 2,
+ Addressable = 1 << 2,
///
/// All sources
///
- ALL = EMBEDDED | WEB | ADDRESSABLE,
+ All = Embedded | Web | Addressable,
}
public static class AssetSourceEnumExtensions
@@ -38,16 +38,16 @@ public static class AssetSourceEnumExtensions
private static readonly Dictionary CURRENT_SOURCE_STRINGS = new ()
{
{
- AssetSource.ADDRESSABLE, "ADDRESSABLE"
+ AssetSource.Addressable, "ADDRESSABLE"
},
{
- AssetSource.EMBEDDED, "EMBEDDED"
+ AssetSource.Embedded, "EMBEDDED"
},
{
- AssetSource.WEB, "WEB"
+ AssetSource.Web, "WEB"
},
{
- AssetSource.NONE, "NONE"
+ AssetSource.None, "NONE"
},
};
diff --git a/Explorer/Assets/DCL/AssetsProvision/CodeResolver/JsCodeResolver.cs b/Explorer/Assets/DCL/AssetsProvision/CodeResolver/JsCodeResolver.cs
index 18fa7476e51..bd02527662e 100644
--- a/Explorer/Assets/DCL/AssetsProvision/CodeResolver/JsCodeResolver.cs
+++ b/Explorer/Assets/DCL/AssetsProvision/CodeResolver/JsCodeResolver.cs
@@ -15,11 +15,11 @@ public JsCodeResolver(IWebRequestController webRequestController)
{
providers = new Dictionary
{
- { AssetSource.WEB, new WebJsCodeProvider(webRequestController) },
+ { AssetSource.Web, new WebJsCodeProvider(webRequestController) },
};
}
public UniTask GetCodeContent(URLAddress contentUrl, CancellationToken ct) =>
- providers[AssetSource.WEB].GetJsCodeAsync(contentUrl, ct);
+ providers[AssetSource.Web].GetJsCodeAsync(contentUrl, ct);
}
}
diff --git a/Explorer/Assets/DCL/AssetsProvision/Contextual/ContextualAsset.cs b/Explorer/Assets/DCL/AssetsProvision/Contextual/ContextualAsset.cs
index 652e573ae19..e071f6de297 100644
--- a/Explorer/Assets/DCL/AssetsProvision/Contextual/ContextualAsset.cs
+++ b/Explorer/Assets/DCL/AssetsProvision/Contextual/ContextualAsset.cs
@@ -15,9 +15,9 @@ public class ContextualAsset : IDisposable where T: Object
public enum State
{
- UNLOADED,
- LOADING,
- LOADED,
+ Unloaded,
+ Loading,
+ Loaded,
}
public State CurrentState { get; private set; }
@@ -26,7 +26,7 @@ public ContextualAsset(AssetReferenceT reference)
{
this.reference = reference;
asset = null;
- CurrentState = State.UNLOADED;
+ CurrentState = State.Unloaded;
}
public async UniTask> AssetAsync(CancellationToken token)
@@ -35,20 +35,20 @@ public async UniTask> AssetAsync(CancellationToken token)
{
if (asset == null)
{
- CurrentState = State.LOADING;
+ CurrentState = State.Loading;
var handle = reference.LoadAssetAsync();
await handle.Task!.AsUniTask().AttachExternalCancellation(token);
if (handle.Status != AsyncOperationStatus.Succeeded) throw new Exception($"Load failed: {reference.RuntimeKey}");
T value = handle.Result!;
asset = new Owned(value);
- CurrentState = State.LOADED;
+ CurrentState = State.Loaded;
}
return asset!.Downgrade();
}
catch (Exception)
{
- CurrentState = State.UNLOADED;
+ CurrentState = State.Unloaded;
throw;
}
}
@@ -59,7 +59,7 @@ public void Release()
reference.ReleaseAsset();
asset.Dispose(out _);
asset = null;
- CurrentState = State.UNLOADED;
+ CurrentState = State.Unloaded;
}
public void Dispose()
diff --git a/Explorer/Assets/DCL/AssetsProvision/Contextual/ContextualImage.cs b/Explorer/Assets/DCL/AssetsProvision/Contextual/ContextualImage.cs
index e58775aa2c6..ae732ddbc53 100644
--- a/Explorer/Assets/DCL/AssetsProvision/Contextual/ContextualImage.cs
+++ b/Explorer/Assets/DCL/AssetsProvision/Contextual/ContextualImage.cs
@@ -31,7 +31,7 @@ private void Awake()
private void OnEnable()
{
- if (asset.CurrentState is ContextualAsset.State.UNLOADED)
+ if (asset.CurrentState is ContextualAsset.State.Unloaded)
LoadAsync().Forget();
}
@@ -64,9 +64,9 @@ private void OnDestroy()
public UniTask TriggerOrWaitReadyAsync(CancellationToken token) =>
asset.CurrentState switch
{
- ContextualAsset.State.UNLOADED => LoadAsync(),
- ContextualAsset.State.LOADING => UniTask.WaitWhile(() => asset.CurrentState is ContextualAsset.State.LOADING, cancellationToken: token),
- ContextualAsset.State.LOADED => UniTask.CompletedTask,
+ ContextualAsset.State.Unloaded => LoadAsync(),
+ ContextualAsset.State.Loading => UniTask.WaitWhile(() => asset.CurrentState is ContextualAsset.State.Loading, cancellationToken: token),
+ ContextualAsset.State.Loaded => UniTask.CompletedTask,
_ => throw new ArgumentOutOfRangeException()
};
}
diff --git a/Explorer/Assets/DCL/Audio/AudioClipConfig.cs b/Explorer/Assets/DCL/Audio/AudioClipConfig.cs
index 57fd7e8b711..9d58ef18355 100644
--- a/Explorer/Assets/DCL/Audio/AudioClipConfig.cs
+++ b/Explorer/Assets/DCL/Audio/AudioClipConfig.cs
@@ -30,7 +30,7 @@ public enum AudioClipSelectionMode
public enum AudioCategory
{
- UI,
+ Ui,
Chat,
World,
Avatar,
diff --git a/Explorer/Assets/DCL/Audio/UIAudioPlaybackController.cs b/Explorer/Assets/DCL/Audio/UIAudioPlaybackController.cs
index 073d80fb3e3..e8bd3e8a63f 100644
--- a/Explorer/Assets/DCL/Audio/UIAudioPlaybackController.cs
+++ b/Explorer/Assets/DCL/Audio/UIAudioPlaybackController.cs
@@ -180,7 +180,7 @@ private bool CheckAudioClips(AudioClipConfig audioClipConfig)
private bool CheckAudioCategory(AudioClipConfig audioClipConfig)
{
//We can only play UI sounds through this bus. Other sounds are discarded
- if (audioClipConfig.Category is not (AudioCategory.Chat or AudioCategory.Music or AudioCategory.UI))
+ if (audioClipConfig.Category is not (AudioCategory.Chat or AudioCategory.Music or AudioCategory.Ui))
{
ReportHub.LogError(new ReportData(ReportCategory.AUDIO), $"Cannot Play Audio {audioClipConfig.name} as it is from category {audioClipConfig.Category} and this bus only supports Chat, Music or UI");
return false;
@@ -228,7 +228,7 @@ private AudioSource GetDefaultAudioSourceForCategory(AudioCategory audioCategory
{
switch (audioCategory)
{
- case AudioCategory.UI:
+ case AudioCategory.Ui:
return UiAudioSource;
case AudioCategory.Chat:
return ChatAudioSource;
@@ -261,7 +261,7 @@ private void OnBeforeApplicationQuitting()
{
switch(audioClipPair.Key.Category)
{
- case AudioCategory.UI:
+ case AudioCategory.Ui:
if(!mixerVolumesController.IsGroupMuted(AudioMixerExposedParam.UI_Volume))
continue;
break;
diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs
index 35918d0b417..9df75ce865b 100644
--- a/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs
+++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/AuthenticationScreenController.cs
@@ -73,7 +73,7 @@ public enum AuthStatus
private UniTaskCompletionSource? lifeCycleTask;
private CancellationTokenSource? loginCancellationTokenSource;
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.FULLSCREEN;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Fullscreen;
public ReactiveProperty CurrentState { get; } = new (AuthStatus.None);
public string CurrentRequestID { get; internal set; } = string.Empty;
public LoginMethod CurrentLoginMethod { get; internal set; }
@@ -152,7 +152,7 @@ protected override void OnViewInstantiated()
audio = new AuthenticationScreenAudio(viewInstance, audioMixerVolumesController, backgroundMusic);
characterPreviewController = new AuthenticationScreenCharacterPreviewController(viewInstance.CharacterPreviewView, emotesSettings, characterPreviewFactory, world, characterPreviewEventBus);
- bool enableEmailOTP = FeaturesRegistry.Instance.IsEnabled(FeatureId.EMAIL_OTP_AUTH);
+ bool enableEmailOTP = FeaturesRegistry.Instance.IsEnabled(FeatureId.EmailOTPAuth);
viewInstance.LoginSelectionAuthView.EmailOTPContainer.SetActive(enableEmailOTP);
viewInstance.DiscordButton.onClick.AddListener(OpenSupportUrl);
@@ -212,7 +212,7 @@ private async UniTaskVoid TryAutoLoginAndProceedAsync(IWeb3Identity storedIdenti
bool autoLoginSuccess = await web3Authenticator.TryAutoLoginAsync(ct);
if (autoLoginSuccess)
- fsm.Enter(new (storedIdentity, storedIdentity.Source != IWeb3Identity.Web3IdentitySource.TOKEN_FILE, ct));
+ fsm.Enter(new (storedIdentity, storedIdentity.Source != IWeb3Identity.Web3IdentitySource.TokenFile, ct));
else
{
fsm.Enter(UIAnimationHashes.IN, true);
diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/IdentityVerificationDappDeepLinkAuthState.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/IdentityVerificationDappDeepLinkAuthState.cs
index 81ca9d02e00..503f1511e97 100644
--- a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/IdentityVerificationDappDeepLinkAuthState.cs
+++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/IdentityVerificationDappDeepLinkAuthState.cs
@@ -104,12 +104,12 @@ private async UniTaskVoid AuthenticateAsync(LoginMethod method, CancellationToke
catch (Web3Exception e)
{
loginException = e;
- machine.Enter(ErrorType.CONNECTION_ERROR);
+ machine.Enter(ErrorType.ConnectionError);
}
catch (Exception e)
{
loginException = e;
- machine.Enter(ErrorType.CONNECTION_ERROR);
+ machine.Enter(ErrorType.ConnectionError);
}
}
}
diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/IdentityVerificationOTPAuthState.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/IdentityVerificationOTPAuthState.cs
index 0f9360fa542..16dcb606c56 100644
--- a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/IdentityVerificationOTPAuthState.cs
+++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/IdentityVerificationOTPAuthState.cs
@@ -125,12 +125,12 @@ private async UniTaskVoid AuthenticateAsync(string email, CancellationToken ct)
catch (InvalidEmailException e)
{
loginException = e;
- machine.Enter(ErrorType.INVALID_EMAIL);
+ machine.Enter(ErrorType.InvalidEmail);
}
catch (Exception e)
{
loginException = e;
- machine.Enter(ErrorType.CONNECTION_ERROR);
+ machine.Enter(ErrorType.ConnectionError);
}
finally{ compositeWeb3Provider.OTPSendSucceeded -= OnOTPSendSucceeded; }
}
diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LobbyForNewAccountAuthState.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LobbyForNewAccountAuthState.cs
index 02e25641e2d..00540beb19d 100644
--- a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LobbyForNewAccountAuthState.cs
+++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LobbyForNewAccountAuthState.cs
@@ -319,7 +319,7 @@ async UniTaskVoid PublishNewProfileAsync(CancellationToken ct)
spanErrorInfo = new SpanErrorInfo("Exception on finalizing new user", e);
view.Hide(UIAnimationHashes.SLIDE);
- fsm.Enter(ErrorType.CONNECTION_ERROR);
+ fsm.Enter(ErrorType.ConnectionError);
}
}
}
diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs
index 62f0a63bc78..186a7f71f29 100644
--- a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs
+++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/LoginSelectionAuthState.cs
@@ -114,14 +114,14 @@ public void Enter(ErrorType errorType)
{
switch (errorType)
{
- case ErrorType.NONE: break;
- case ErrorType.CONNECTION_ERROR:
+ case ErrorType.None: break;
+ case ErrorType.ConnectionError:
view.ErrorPopupRoot.SetActive(true);
break;
- case ErrorType.RESTRICTED_USER:
+ case ErrorType.RestrictedUser:
view.RestrictedUserContainer.SetActive(true);
break;
- case ErrorType.INVALID_EMAIL:
+ case ErrorType.InvalidEmail:
view.SetEmailInputFieldErrorState(true);
Enter();
return;
@@ -207,9 +207,9 @@ private void RequestAlphaAccess() =>
public enum ErrorType
{
- NONE = 0,
- CONNECTION_ERROR = 1,
- RESTRICTED_USER = 2,
- INVALID_EMAIL = 3,
+ None = 0,
+ ConnectionError = 1,
+ RestrictedUser = 2,
+ InvalidEmail = 3,
}
}
diff --git a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/ProfileFetchingAuthState.cs b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/ProfileFetchingAuthState.cs
index 5087891a682..80423a46424 100644
--- a/Explorer/Assets/DCL/AuthenticationScreenFlow/States/ProfileFetchingAuthState.cs
+++ b/Explorer/Assets/DCL/AuthenticationScreenFlow/States/ProfileFetchingAuthState.cs
@@ -93,7 +93,7 @@ private async UniTaskVoid FetchProfileFlowAsync(string email, IWeb3Identity iden
if (!IsUserAllowedToAccessToBeta(identity))
{
profileFetchException = new NotAllowedUserException($"User not allowed to access beta - restricted user {email} in {nameof(ProfileFetchingAuthState)} ({(isCached ? "cached" : "main")} flow)");
- machine.Enter(ErrorType.RESTRICTED_USER);
+ machine.Enter(ErrorType.RestrictedUser);
}
else
{
@@ -146,12 +146,12 @@ private async UniTaskVoid FetchProfileFlowAsync(string email, IWeb3Identity iden
catch (TimeoutException e)
{
profileFetchException = e;
- machine.Enter(ErrorType.CONNECTION_ERROR);
+ machine.Enter(ErrorType.ConnectionError);
}
catch (Exception e)
{
profileFetchException = e;
- machine.Enter(ErrorType.CONNECTION_ERROR);
+ machine.Enter(ErrorType.ConnectionError);
}
}
}
diff --git a/Explorer/Assets/DCL/AvatarAnimation/Editor/MoveAvatarPlayableAsset.cs b/Explorer/Assets/DCL/AvatarAnimation/Editor/MoveAvatarPlayableAsset.cs
index b694856323f..cff9b23d549 100644
--- a/Explorer/Assets/DCL/AvatarAnimation/Editor/MoveAvatarPlayableAsset.cs
+++ b/Explorer/Assets/DCL/AvatarAnimation/Editor/MoveAvatarPlayableAsset.cs
@@ -14,7 +14,7 @@ public class MoveAvatarPlayableAsset : PlayableAsset, ITimelineClipAsset
public float Forward = 0.0f;
[Tooltip("Makes the avatar use a given animation while moving forward. While the clip is not playing, the animation is Idle.")]
- public MovementKind MovementAnimation = MovementKind.IDLE;
+ public MovementKind MovementAnimation = MovementKind.Idle;
[Tooltip("Makes the avatar rotate a given amount of degrees per second. Positive means turning to the right.")]
[Range(-360.0f, 360.0f)]
diff --git a/Explorer/Assets/DCL/AvatarAnimation/Editor/MoveAvatarPlayableBehaviour.cs b/Explorer/Assets/DCL/AvatarAnimation/Editor/MoveAvatarPlayableBehaviour.cs
index 786f8377ed4..54c926ad4c0 100644
--- a/Explorer/Assets/DCL/AvatarAnimation/Editor/MoveAvatarPlayableBehaviour.cs
+++ b/Explorer/Assets/DCL/AvatarAnimation/Editor/MoveAvatarPlayableBehaviour.cs
@@ -15,7 +15,7 @@ namespace DCL.AvatarAnimation.Editor
public class MoveAvatarPlayableBehaviour : BaseAvatarPlayableBehaviour
{
public float Forward = 0.0f;
- public MovementKind MovementAnimation = MovementKind.IDLE;
+ public MovementKind MovementAnimation = MovementKind.Idle;
public float Rotation = 0.0f;
private Transform cachedCharacterControllerTransform;
@@ -43,7 +43,7 @@ public override void OnBehaviourPause(Playable playable, FrameData info)
if (hasInputcomponent)
{
- movement.Kind = MovementKind.IDLE;
+ movement.Kind = MovementKind.Idle;
movement.Axes = Vector2.zero;
}
}
diff --git a/Explorer/Assets/DCL/AvatarAnimation/Editor/TriggerEmotePlayableBehaviour.cs b/Explorer/Assets/DCL/AvatarAnimation/Editor/TriggerEmotePlayableBehaviour.cs
index 85d74f8f8c6..6e3834a981f 100644
--- a/Explorer/Assets/DCL/AvatarAnimation/Editor/TriggerEmotePlayableBehaviour.cs
+++ b/Explorer/Assets/DCL/AvatarAnimation/Editor/TriggerEmotePlayableBehaviour.cs
@@ -39,7 +39,7 @@ public override void ProcessFrame(Playable playable, FrameData info, object play
profile.IsDirty = true;
// It adds the emote intent (which will be consumed and removed by the CharacterEmoteSystem) if it was not already added
- CharacterEmoteIntent emoteIntent = new (){ EmoteId = URN, TriggerSource = TriggerSource.SELF, Spatial = true};
+ CharacterEmoteIntent emoteIntent = new (){ EmoteId = URN, TriggerSource = TriggerSource.Self, Spatial = true};
GlobalWorld.ECSWorldInstance.Add(cachedEntity, emoteIntent);
}
}
diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/AvatarCachedVisibilityComponent.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/AvatarCachedVisibilityComponent.cs
index deab0bc9ded..ab39c7267b4 100644
--- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/AvatarCachedVisibilityComponent.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/AvatarCachedVisibilityComponent.cs
@@ -7,21 +7,21 @@ public struct AvatarCachedVisibilityComponent
public bool ShouldUpdateDitherState(float newDistance, float startFadeDithering, float endFadeDithering)
{
- if (newDistance >= startFadeDithering && currentDitherState != DITHER_STATE.OPAQUE)
+ if (newDistance >= startFadeDithering && currentDitherState != DITHER_STATE.Opaque)
{
- currentDitherState = DITHER_STATE.OPAQUE;
+ currentDitherState = DITHER_STATE.Opaque;
return true;
}
- if (newDistance <= endFadeDithering && currentDitherState != DITHER_STATE.TRANSPARENT)
+ if (newDistance <= endFadeDithering && currentDitherState != DITHER_STATE.Transparent)
{
- currentDitherState = DITHER_STATE.TRANSPARENT;
+ currentDitherState = DITHER_STATE.Transparent;
return true;
}
if (newDistance > endFadeDithering && newDistance < startFadeDithering)
{
- currentDitherState = DITHER_STATE.DITHERING;
+ currentDitherState = DITHER_STATE.Dithering;
return true;
}
@@ -30,15 +30,15 @@ public bool ShouldUpdateDitherState(float newDistance, float startFadeDithering,
public void ResetDitherState()
{
- currentDitherState = DITHER_STATE.UNINITIALIZED;
+ currentDitherState = DITHER_STATE.Uninitialized;
}
}
public enum DITHER_STATE
{
- UNINITIALIZED,
- TRANSPARENT,
- DITHERING,
- OPAQUE,
+ Uninitialized,
+ Transparent,
+ Dithering,
+ Opaque,
}
}
diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/HiddenPlayerComponent.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/HiddenPlayerComponent.cs
index 3dc427b4415..3cce4e42e9c 100644
--- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/HiddenPlayerComponent.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Components/HiddenPlayerComponent.cs
@@ -7,8 +7,8 @@ public struct HiddenPlayerComponent
[Flags]
public enum HiddenReason : byte
{
- BLOCKED = 1 << 0,
- BANNED = 1 << 1,
+ Blocked = 1 << 0,
+ Banned = 1 << 1,
}
public HiddenReason Reason;
diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/DemoScripts/Systems/InstantiateRandomAvatarsSystem.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/DemoScripts/Systems/InstantiateRandomAvatarsSystem.cs
index 697181838ef..fb2a1a6fd3d 100644
--- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/DemoScripts/Systems/InstantiateRandomAvatarsSystem.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/DemoScripts/Systems/InstantiateRandomAvatarsSystem.cs
@@ -334,7 +334,7 @@ private void CreateAvatar(ICharacterControllerSettings characterControllerSettin
new RandomAvatar());
if (hasEmote)
- World.Add(entity, new CharacterEmoteIntent { EmoteId = new URN(EMOTE_URN_PREFIX + emoteDropdownBinding.Value), Spatial = true, TriggerSource = TriggerSource.SELF });
+ World.Add(entity, new CharacterEmoteIntent { EmoteId = new URN(EMOTE_URN_PREFIX + emoteDropdownBinding.Value), Spatial = true, TriggerSource = TriggerSource.Self });
}
else
{
@@ -366,7 +366,7 @@ private void CreateAvatar(ICharacterControllerSettings characterControllerSettin
);
if (hasEmote)
- World.Add(entity, new CharacterEmoteIntent { EmoteId = new URN(EMOTE_URN_PREFIX + emoteDropdownBinding.Value), Spatial = true, TriggerSource = TriggerSource.SELF });
+ World.Add(entity, new CharacterEmoteIntent { EmoteId = new URN(EMOTE_URN_PREFIX + emoteDropdownBinding.Value), Spatial = true, TriggerSource = TriggerSource.Self });
}
}
diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarInstantiatorSystem.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarInstantiatorSystem.cs
index f5ade536adc..37802651b55 100644
--- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarInstantiatorSystem.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarInstantiatorSystem.cs
@@ -85,8 +85,8 @@ public AvatarInstantiatorSystem(World world,
for (var i = 0; i < facialFeaturesTexturesByBodyShapeCopy.Length; i++)
facialFeaturesTexturesByBodyShapeCopy[i] = new FacialFeaturesTextures(new Dictionary>());
- pointAtFeatureEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.POINT_AT);
- headSyncFeatureEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.HEAD_SYNC);
+ pointAtFeatureEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.PointAt);
+ headSyncFeatureEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.HeadSync);
}
protected override void OnDispose()
diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs
index fa1293a8398..896dda74182 100644
--- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs
@@ -145,7 +145,7 @@ private void BlockAvatars(in Entity entity, ref AvatarShapeComponent avatarShape
bool isBlocked = userBlockingCache.UserIsBlocked(avatarShapeComponent.ID);
- SetHiddenComponent(entity, isBlocked, HiddenPlayerComponent.HiddenReason.BLOCKED);
+ SetHiddenComponent(entity, isBlocked, HiddenPlayerComponent.HiddenReason.Blocked);
}
[Query]
@@ -156,7 +156,7 @@ private void BanAvatars(in Entity entity, ref AvatarShapeComponent avatarShapeCo
bool isBanned = RoomMetadataCurrentScene.Instance.IsUserBanned(avatarShapeComponent.ID);
- SetHiddenComponent(entity, isBanned, HiddenPlayerComponent.HiddenReason.BANNED);
+ SetHiddenComponent(entity, isBanned, HiddenPlayerComponent.HiddenReason.Banned);
}
private void SetHiddenComponent(Entity entity, bool hiddenValue, HiddenPlayerComponent.HiddenReason hiddenReason)
diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarShapeVisibilitySystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarShapeVisibilitySystemShould.cs
index 0500365d224..df9d5f6b143 100644
--- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarShapeVisibilitySystemShould.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/EditMode/AvatarShapeVisibilitySystemShould.cs
@@ -282,7 +282,7 @@ public void AddHiddenComponentWhenUserIsBlocked()
// Assert
Assert.IsTrue(world.Has(avatarEntity));
ref var hiddenComponent = ref world.Get(avatarEntity);
- Assert.IsTrue(hiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.BLOCKED));
+ Assert.IsTrue(hiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.Blocked));
}
[Test]
@@ -449,11 +449,11 @@ public void CombineMultipleHiddenReasons()
// Manually add banned reason to test combination
ref var hiddenComponent = ref world.Get(avatarEntity);
- hiddenComponent.Reason |= HiddenPlayerComponent.HiddenReason.BANNED;
+ hiddenComponent.Reason |= HiddenPlayerComponent.HiddenReason.Banned;
// Act - verify both reasons are present
- Assert.IsTrue(hiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.BLOCKED));
- Assert.IsTrue(hiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.BANNED));
+ Assert.IsTrue(hiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.Blocked));
+ Assert.IsTrue(hiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.Banned));
// Unblock user
userBlockingCache.UserIsBlocked(USER_ID).Returns(false);
@@ -462,8 +462,8 @@ public void CombineMultipleHiddenReasons()
// Assert - Only banned reason should remain
Assert.IsTrue(world.Has(avatarEntity));
ref var updatedHiddenComponent = ref world.Get(avatarEntity);
- Assert.IsFalse(updatedHiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.BLOCKED));
- Assert.IsTrue(updatedHiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.BANNED));
+ Assert.IsFalse(updatedHiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.Blocked));
+ Assert.IsTrue(updatedHiddenComponent.Reason.HasFlag(HiddenPlayerComponent.HiddenReason.Banned));
}
[Test]
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/CharacterEmoteIntent.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/CharacterEmoteIntent.cs
index 47ff1d0374a..4260d3af7b5 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/CharacterEmoteIntent.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/CharacterEmoteIntent.cs
@@ -6,10 +6,10 @@ namespace DCL.AvatarRendering.Emotes
{
public enum TriggerSource
{
- PREVIEW,
- SELF,
- REMOTE,
- SCENE,
+ Preview,
+ Self,
+ Remote,
+ Scene,
}
public struct CharacterEmoteIntent
@@ -25,7 +25,7 @@ public void UpdateRemoteId(URN emoteId)
{
this.EmoteId = emoteId;
this.Spatial = true;
- this.TriggerSource = TriggerSource.REMOTE;
+ this.TriggerSource = TriggerSource.Remote;
}
public bool UpdatePlayTimeout(float dt)
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs
index 2449271bbeb..dae7825c320 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetEmotesByPointersIntention.cs
@@ -27,7 +27,7 @@ public struct GetEmotesByPointersIntention : IAssetIntention, IDisposable, IEqua
public GetEmotesByPointersIntention(List pointers,
BodyShape bodyShape,
- AssetSource permittedSources = AssetSource.ALL,
+ AssetSource permittedSources = AssetSource.All,
int timeout = StreamableLoadingDefaults.TIMEOUT) : this()
{
this.pointers = pointers;
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs
index 696a96dbf7b..09c196e21f2 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Components/Intents/GetSceneEmoteFromRealmIntention.cs
@@ -37,7 +37,7 @@ public GetSceneEmoteFromRealmIntention(
string emoteHash,
bool loop,
BodyShape bodyShape,
- AssetSource permittedSources = AssetSource.ALL,
+ AssetSource permittedSources = AssetSource.All,
int timeout = StreamableLoadingDefaults.TIMEOUT
) : this()
{
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/EmoteTriggerSource.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/EmoteTriggerSource.cs
index acbbaddacd0..598a14447c5 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/EmoteTriggerSource.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/EmoteTriggerSource.cs
@@ -6,9 +6,9 @@ namespace DCL.AvatarRendering.Emotes
public enum EmoteTriggerSource
{
/// Click on a wheel slot or press [0-9] while the emotes wheel is open.
- WHEEL_SLOT,
+ WheelSlot,
/// Press B+[0-9] while the emotes wheel is closed.
- SHORTCUT,
+ Shortcut,
}
}
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteWheelShortcutHandler.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteWheelShortcutHandler.cs
index 36f4e287023..e220869ca2d 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteWheelShortcutHandler.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Helpers/EmoteWheelShortcutHandler.cs
@@ -34,10 +34,10 @@ public virtual void NotifyEmotePlayed(EmoteTriggerSource source)
{
switch (source)
{
- case EmoteTriggerSource.SHORTCUT:
+ case EmoteTriggerSource.Shortcut:
ignoreNextRelease = true;
break;
- case EmoteTriggerSource.WHEEL_SLOT:
+ case EmoteTriggerSource.WheelSlot:
lockUntilTime = UnityEngine.Time.time + QUICK_EMOTE_LOCK_TIME;
break;
default:
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Plugin/EmotesContainer.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Plugin/EmotesContainer.cs
index 2df78a2d842..6985fd35005 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Plugin/EmotesContainer.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Plugin/EmotesContainer.cs
@@ -33,11 +33,11 @@ protected override async UniTask InitializeInternalAsync(Settings settings, Canc
AudioSource audioSource = (await assetsProvisioner.ProvideMainAssetAsync(settings.EmoteAudioSource, ct)).Value.GetComponent();
EmoteMaskCatalog emoteMaskCatalog = (await assetsProvisioner.ProvideMainAssetAsync(settings.EmoteMaskCatalog, ct)).Value;
- bool legacyAnimationsEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.LOCAL_SCENE_DEVELOPMENT)
- || FeaturesRegistry.Instance.IsEnabled(FeatureId.SELF_PREVIEW_BUILDER_COLLECTIONS);
+ bool legacyAnimationsEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.LocalSceneDevelopment)
+ || FeaturesRegistry.Instance.IsEnabled(FeatureId.SelfPreviewBuilderCollections);
- bool forceBackfaceCulling = FeaturesRegistry.Instance.IsEnabled(FeatureId.FORCE_BACKFACE_CULLING);
+ bool forceBackfaceCulling = FeaturesRegistry.Instance.IsEnabled(FeatureId.ForceBackfaceCulling);
EmotePlayer = new EmotePlayer(audioSource, emoteMaskCatalog, legacyAnimationsEnabled, forceBackfaceCulling);
}
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/SceneMaskedEmoteSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/SceneMaskedEmoteSystem.cs
index 473c3ffa2b3..d3c6e700d88 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/SceneMaskedEmoteSystem.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/Play/SceneMaskedEmoteSystem.cs
@@ -198,7 +198,7 @@ private void UpdateMaskedEmoteVisibility(ref CharacterMaskedEmoteComponent maske
&& ec.CurrentEmoteReference != null;
bool isGliding = globalWorld.TryGet(globalPlayerEntity, out GlideState glideState)
- && glideState.Value is GlideStateValue.OPENING_PROP or GlideStateValue.GLIDING;
+ && glideState.Value is GlideStateValue.OpeningProp or GlideStateValue.Gliding;
bool shouldPlay = isInScene && !fullBodyIsPlaying && !isGliding;
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/UpdateEmoteInputSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/UpdateEmoteInputSystem.cs
index ae11a54301a..33fc0172131 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/UpdateEmoteInputSystem.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Systems/UpdateEmoteInputSystem.cs
@@ -52,7 +52,7 @@ private void OnSlotPerformed(InputAction.CallbackContext obj)
{
int emoteIndex = actionNameById[obj.action.name];
triggeredEmote = emoteIndex;
- triggeredEmoteSource = EmoteTriggerSource.SHORTCUT;
+ triggeredEmoteSource = EmoteTriggerSource.Shortcut;
}
protected override void Update(float t)
@@ -76,7 +76,7 @@ protected override void Update(float t)
private void TriggerEmoteBySlotIntent(in Entity entity, ref TriggerEmoteBySlotIntent intent)
{
triggeredEmote = intent.Slot;
- triggeredEmoteSource = EmoteTriggerSource.WHEEL_SLOT;
+ triggeredEmoteSource = EmoteTriggerSource.WheelSlot;
World.Remove(entity);
}
@@ -90,7 +90,7 @@ private void TriggerEmote([Data] int emoteIndex,
in AvatarShapeComponent avatarShapeComponent,
in GlideState glideState)
{
- if (inputModifier.DisableEmote || glideState.Value != GlideStateValue.PROP_CLOSED) return;
+ if (inputModifier.DisableEmote || glideState.Value != GlideStateValue.PropClosed) return;
IReadOnlyList emotes = profile.Avatar.Emotes;
if (emoteIndex < 0 || emoteIndex >= emotes.Count) return;
@@ -99,7 +99,7 @@ private void TriggerEmote([Data] int emoteIndex,
if (emoteId.IsNullOrEmpty()) return;
- var newEmoteIntent = new CharacterEmoteIntent { EmoteId = emoteId, Spatial = true, TriggerSource = TriggerSource.SELF};
+ var newEmoteIntent = new CharacterEmoteIntent { EmoteId = emoteId, Spatial = true, TriggerSource = TriggerSource.Self};
ref var emoteIntent = ref World.AddOrGet(entity, newEmoteIntent);
emoteIntent = newEmoteIntent;
}
diff --git a/Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/UpdateEmoteInputSystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/UpdateEmoteInputSystemShould.cs
index 19daedc0f31..e6c6dccccb8 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/UpdateEmoteInputSystemShould.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Emotes/Tests/UpdateEmoteInputSystemShould.cs
@@ -95,7 +95,7 @@ public void TriggerEmoteBySlotIntent()
Assert.IsTrue(world.Has(entity));
var intent = world.Get(entity);
Assert.AreEqual("urn:decentraland:off-chain:base-avatars:wave", intent.EmoteId.ToString());
- Assert.AreEqual(TriggerSource.SELF, intent.TriggerSource);
+ Assert.AreEqual(TriggerSource.Self, intent.TriggerSource);
Assert.IsTrue(intent.Spatial);
Assert.IsFalse(world.Has(entity), "TriggerEmoteBySlotIntent should be removed after processing");
}
@@ -232,7 +232,7 @@ public void NotifyHandlerWithWheelSlotWhenTriggeringFromIntent()
// Assert - handler is notified with WheelSlot when trigger came from wheel intent (not Shortcut)
Assert.AreEqual(1, testShortcutHandler.NotifyCalls.Count, "Handler should be notified once");
- Assert.AreEqual(EmoteTriggerSource.WHEEL_SLOT, testShortcutHandler.NotifyCalls[0]);
+ Assert.AreEqual(EmoteTriggerSource.WheelSlot, testShortcutHandler.NotifyCalls[0]);
Assert.IsTrue(world.Has(entity), "Emote should still be triggered");
}
diff --git a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs
index 65a7a2a693e..70c58ead7de 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Thumbnails/Utils/LoadThumbnailsUtils.cs
@@ -65,7 +65,7 @@ public static void CreateThumbnailABPromise(
GetAssetBundleIntention.FromHash(
hash: thumbnailPath.Value + PlatformUtils.GetCurrentPlatform(),
typeof(Texture2D),
- permittedSources: AssetSource.ALL,
+ permittedSources: AssetSource.All,
assetBundleManifestVersion: assetBundleManifestVersion,
parentEntityID: attachment.GetEntityId(),
cancellationTokenSource: cancellationTokenSource ?? new CancellationTokenSource()
diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearablesByPointersIntention.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearablesByPointersIntention.cs
index ff30cf44bac..04bc46cd5b5 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearablesByPointersIntention.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Components/Intentions/GetWearablesByPointersIntention.cs
@@ -28,7 +28,7 @@ public struct GetWearablesByPointersIntention : IAssetIntention, IDisposable, IE
///
public long ResolvedWearablesIndices;
- public GetWearablesByPointersIntention(List pointers, BodyShape bodyShape, IReadOnlyCollection forceRender, AssetSource permittedSources = AssetSource.ALL)
+ public GetWearablesByPointersIntention(List pointers, BodyShape bodyShape, IReadOnlyCollection forceRender, AssetSource permittedSources = AssetSource.All)
{
Pointers = pointers;
BodyShape = bodyShape;
diff --git a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs
index 7c13f91b6a8..c7219a9fb2c 100644
--- a/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs
+++ b/Explorer/Assets/DCL/AvatarRendering/Wearables/Systems/Load/LoadDefaultWearablesSystem.cs
@@ -152,7 +152,7 @@ private void AddBodyShapes()
{
wearable.GetUrn()
}, BodyShape.MALE,
- Array.Empty(), AssetSource.EMBEDDED),
+ Array.Empty(), AssetSource.Embedded),
PartitionComponent.TOP_PRIORITY);
}
@@ -228,7 +228,7 @@ private void AddBodyShapes()
{
wearable.GetUrn()
}, BodyShape.FEMALE,
- Array.Empty(), AssetSource.EMBEDDED),
+ Array.Empty(), AssetSource.Embedded),
PartitionComponent.TOP_PRIORITY);
}
diff --git a/Explorer/Assets/DCL/Backpack/AvatarSection/AvatarController.cs b/Explorer/Assets/DCL/Backpack/AvatarSection/AvatarController.cs
index 97eae67be80..457fc8a0e9f 100644
--- a/Explorer/Assets/DCL/Backpack/AvatarSection/AvatarController.cs
+++ b/Explorer/Assets/DCL/Backpack/AvatarSection/AvatarController.cs
@@ -65,7 +65,7 @@ public AvatarController(AvatarView view,
outfitsPresenter,
(RectTransform) view.transform);
- bool isOutfitsEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.BACKPACK_OUTFITS);
+ bool isOutfitsEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.BackpackOutfits);
if (!isOutfitsEnabled)
tabsManager.SetTabEnabled(AvatarSubSection.Outfits, false);
diff --git a/Explorer/Assets/DCL/Backpack/AvatarSection/Outfits/Commands/DeleteOutfitCommand.cs b/Explorer/Assets/DCL/Backpack/AvatarSection/Outfits/Commands/DeleteOutfitCommand.cs
index 623a853dcb1..9272168e6b1 100644
--- a/Explorer/Assets/DCL/Backpack/AvatarSection/Outfits/Commands/DeleteOutfitCommand.cs
+++ b/Explorer/Assets/DCL/Backpack/AvatarSection/Outfits/Commands/DeleteOutfitCommand.cs
@@ -60,7 +60,7 @@ public async UniTask ExecuteAsync(int slotIndex, Cancellati
return DeleteOutfitOutcome.Failed;
}
- if (ct.IsCancellationRequested || decision == ConfirmationResult.CANCEL)
+ if (ct.IsCancellationRequested || decision == ConfirmationResult.Cancel)
return DeleteOutfitOutcome.Cancelled;
try
diff --git a/Explorer/Assets/DCL/Backpack/BackpackSearchController.cs b/Explorer/Assets/DCL/Backpack/BackpackSearchController.cs
index 0133020f8ec..3c8c9bda0c5 100644
--- a/Explorer/Assets/DCL/Backpack/BackpackSearchController.cs
+++ b/Explorer/Assets/DCL/Backpack/BackpackSearchController.cs
@@ -37,10 +37,10 @@ public BackpackSearchController(SearchBarView view,
}
private void RestoreInput(string text) =>
- inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Enable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
private void DisableShortcutsInput(string text) =>
- inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Disable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
public void Clear()
{
diff --git a/Explorer/Assets/DCL/Backpack/Gifting/Notifications/GiftReceivedPopupController.cs b/Explorer/Assets/DCL/Backpack/Gifting/Notifications/GiftReceivedPopupController.cs
index 03a0a9445c7..e6cbeced4d5 100644
--- a/Explorer/Assets/DCL/Backpack/Gifting/Notifications/GiftReceivedPopupController.cs
+++ b/Explorer/Assets/DCL/Backpack/Gifting/Notifications/GiftReceivedPopupController.cs
@@ -25,7 +25,7 @@ public class GiftReceivedPopupController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private ImageController imageController;
private CancellationTokenSource? lifeCts;
diff --git a/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftSelection/GiftSelectionController.cs b/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftSelection/GiftSelectionController.cs
index 31598cf0870..60946f911e5 100644
--- a/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftSelection/GiftSelectionController.cs
+++ b/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftSelection/GiftSelectionController.cs
@@ -21,7 +21,7 @@ public class GiftSelectionController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private readonly IProfileRepository profileRepository;
private readonly GiftSelectionComponentFactory componentFactory;
diff --git a/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftSelection/GiftingHeaderPresenter.cs b/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftSelection/GiftingHeaderPresenter.cs
index 77ae62bd939..da50cfdd273 100644
--- a/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftSelection/GiftingHeaderPresenter.cs
+++ b/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftSelection/GiftingHeaderPresenter.cs
@@ -16,10 +16,10 @@ public class GiftingHeaderPresenter : IDisposable
{
private static readonly InputMapComponent.Kind[] BLOCKED_INPUTS =
{
- InputMapComponent.Kind.PLAYER,
- InputMapComponent.Kind.SHORTCUTS,
- InputMapComponent.Kind.CAMERA,
- InputMapComponent.Kind.IN_WORLD_CAMERA,
+ InputMapComponent.Kind.Player,
+ InputMapComponent.Kind.Shortcuts,
+ InputMapComponent.Kind.Camera,
+ InputMapComponent.Kind.InWorldCamera,
};
private const string TITLE_FORMAT = "Send a Gift to {1}";
diff --git a/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftTransfer/GiftTransferController.cs b/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftTransfer/GiftTransferController.cs
index a86f9dfcffe..d95f804b60a 100644
--- a/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftTransfer/GiftTransferController.cs
+++ b/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftTransfer/GiftTransferController.cs
@@ -23,7 +23,7 @@ public sealed class GiftTransferController
{
private static readonly TimeSpan LONG_RUNNING_HINT_DELAY = TimeSpan.FromSeconds(10);
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private enum State { Waiting, Success, Failed }
@@ -274,7 +274,7 @@ private async UniTask ShowErrorPopupAsync(CancellationToken ct)
.ConfirmationDialogOpener
.OpenConfirmationDialogAsync(dialogParams, ct);
- if (result == ConfirmationResult.CONFIRM)
+ if (result == ConfirmationResult.Confirm)
{
ReportHub.Log(ReportCategory.GIFTING, GiftingTextIds.RetryLogMessage);
await mvcManager.ShowAsync(IssueCommand(inputData), ct);
diff --git a/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftTransferSuccess/GiftTransferSuccessController.cs b/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftTransferSuccess/GiftTransferSuccessController.cs
index fdb3d762976..581e7dc42a7 100644
--- a/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftTransferSuccess/GiftTransferSuccessController.cs
+++ b/Explorer/Assets/DCL/Backpack/Gifting/Presenters/GiftTransferSuccess/GiftTransferSuccessController.cs
@@ -13,7 +13,7 @@ namespace DCL.Backpack.Gifting.Presenters
public sealed class GiftTransferSuccessController
: ControllerBase
{
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private CancellationTokenSource? lifeCts;
diff --git a/Explorer/Assets/DCL/Backpack/SmartWearableAuthorizationPopupController.cs b/Explorer/Assets/DCL/Backpack/SmartWearableAuthorizationPopupController.cs
index 1cd632f7208..4c6e938ba99 100644
--- a/Explorer/Assets/DCL/Backpack/SmartWearableAuthorizationPopupController.cs
+++ b/Explorer/Assets/DCL/Backpack/SmartWearableAuthorizationPopupController.cs
@@ -31,7 +31,7 @@ public SmartWearableAuthorizationPopupController(
this.categoryIcons = categoryIcons;
}
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
protected override void OnViewInstantiated()
{
diff --git a/Explorer/Assets/DCL/ChangeRealmPrompt/ChangeRealmPromptController.cs b/Explorer/Assets/DCL/ChangeRealmPrompt/ChangeRealmPromptController.cs
index 28ed665798e..024305979f6 100644
--- a/Explorer/Assets/DCL/ChangeRealmPrompt/ChangeRealmPromptController.cs
+++ b/Explorer/Assets/DCL/ChangeRealmPrompt/ChangeRealmPromptController.cs
@@ -8,7 +8,7 @@ namespace DCL.ChangeRealmPrompt
{
public partial class ChangeRealmPromptController : ControllerBase
{
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private readonly ICursor cursor;
private readonly Action changeRealmCallback;
diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs b/Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs
index 6187fa8c0db..ca59e5c967f 100644
--- a/Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs
+++ b/Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs
@@ -5,7 +5,7 @@ public enum CameraMode : byte
FirstPerson = 0,
ThirdPerson = 1,
DroneView = 2,
- SDKCamera = 3,
+ SdkCamera = 3,
///
/// Free-fly, does not follow character, intercepts controls designated for character movement
diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Components/CursorComponent.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Components/CursorComponent.cs
index 2470ed434ce..978ab3eebc6 100644
--- a/Explorer/Assets/DCL/Character/CharacterCamera/Components/CursorComponent.cs
+++ b/Explorer/Assets/DCL/Character/CharacterCamera/Components/CursorComponent.cs
@@ -12,7 +12,7 @@ public enum CursorState
/// Cursor is Locked and opened a menu with which the user has to interact without unlocking.
/// The mouse cursor will be visible and camera will not move, so the user can click on the UI. The camera will keep the Locked position.
///
- LockedWithUI
+ LockedWithUi
}
public struct CursorComponent
diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ApplyCinemachineCameraInputSystem.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ApplyCinemachineCameraInputSystem.cs
index 57bd1e99ac7..2ecf6ed9f23 100644
--- a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ApplyCinemachineCameraInputSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ApplyCinemachineCameraInputSystem.cs
@@ -44,7 +44,7 @@ private void Apply([Data] float dt, ref CameraComponent camera, ref CameraInput
dvc.m_YAxis.m_InputAxisValue = cameraInput.Delta.y;
break;
case CameraMode.ThirdPerson:
- case CameraMode.SDKCamera:
+ case CameraMode.SdkCamera:
CinemachineFreeLook tpc = cinemachinePreset.ThirdPersonCameraData.Camera;
tpc.m_XAxis.m_InputAxisValue = cameraInput.Delta.x;
tpc.m_YAxis.m_InputAxisValue = cameraInput.Delta.y;
@@ -73,7 +73,7 @@ private void Apply([Data] float dt, ref CameraComponent camera, ref CameraInput
private void ForceLookAt(in Entity entity, in CameraComponent camera, ref ICinemachinePreset cinemachinePreset, in CameraLookAtIntent lookAtIntent)
{
// Only process the LookAtIntent if we're not in SDKCamera mode
- if (camera.Mode == CameraMode.SDKCamera) return;
+ if (camera.Mode == CameraMode.SdkCamera) return;
switch (camera.Mode)
{
diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ControlCinemachineVirtualCameraSystem.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ControlCinemachineVirtualCameraSystem.cs
index b29548cbf5d..413910ad2f0 100644
--- a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ControlCinemachineVirtualCameraSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/ControlCinemachineVirtualCameraSystem.cs
@@ -59,7 +59,7 @@ protected override void Update(float t)
[None(typeof(CameraBlockerComponent), typeof(InWorldCameraComponent))]
private void HandleCameraInput([Data] float dt, in CameraComponent cameraComponent)
{
- if (cameraComponent.Mode == CameraMode.SDKCamera) return;
+ if (cameraComponent.Mode == CameraMode.SdkCamera) return;
// this blocks the user of changing the current camera, but the SDK still can do it
if (!cameraComponent.CameraInputChangeEnabled) return;
@@ -107,7 +107,7 @@ private void HandleFreeFlyState(ref CameraComponent cameraComponent, in CameraIn
[None(typeof(InWorldCameraComponent))]
private void HandleOffset([Data] float dt, ref CameraComponent cameraComponent, ref ICinemachinePreset cinemachinePreset, in CameraInput input, in CursorComponent cursorComponent)
{
- if (cameraComponent.Mode is not (CameraMode.DroneView or CameraMode.ThirdPerson) || cursorComponent.CursorState == CursorState.LockedWithUI)
+ if (cameraComponent.Mode is not (CameraMode.DroneView or CameraMode.ThirdPerson) || cursorComponent.CursorState == CursorState.LockedWithUi)
return;
ICinemachineThirdPersonCameraData cameraData = cameraComponent.Mode == CameraMode.ThirdPerson ? cinemachinePreset.ThirdPersonCameraData : cinemachinePreset.DroneViewCameraData;
@@ -148,7 +148,7 @@ private void HandleOffset([Data] float dt, ref CameraComponent cameraComponent,
[None(typeof(InWorldCameraComponent))]
private void UpdateCameraState(ref CameraComponent cameraComponent, ref ICinemachinePreset cinemachinePreset, ref CinemachineCameraState state)
{
- if (cameraComponent.Mode == CameraMode.SDKCamera) return;
+ if (cameraComponent.Mode == CameraMode.SdkCamera) return;
if (cameraComponent.Mode == CameraMode.FirstPerson)
cameraComponent.IsTransitioningToFirstPerson = cinemachinePreset.Brain.IsBlending;
@@ -158,7 +158,7 @@ private void UpdateCameraState(ref CameraComponent cameraComponent, ref ICinemac
private void SwitchCamera(CameraMode targetCameraMode, ref ICinemachinePreset cinemachinePreset, ref CameraComponent camera, ref CinemachineCameraState cameraState)
{
- if (camera.PreviousMode != CameraMode.SDKCamera && IsCorrectCameraEnabled(targetCameraMode, cinemachinePreset))
+ if (camera.PreviousMode != CameraMode.SdkCamera && IsCorrectCameraEnabled(targetCameraMode, cinemachinePreset))
return;
ProcessCameraActivation(targetCameraMode, cinemachinePreset, ref camera, ref cameraState);
@@ -194,7 +194,7 @@ private void ProcessCameraActivation(CameraMode targetCameraMode, ICinemachinePr
SetActiveCamera(ref cameraState, cinemachinePreset.FirstPersonCameraData.Camera);
break;
case CameraMode.ThirdPerson:
- cinemachinePreset.ThirdPersonCameraData.Camera.m_Transitions.m_InheritPosition = camera.PreviousMode != CameraMode.FirstPerson && camera.PreviousMode != CameraMode.SDKCamera;
+ cinemachinePreset.ThirdPersonCameraData.Camera.m_Transitions.m_InheritPosition = camera.PreviousMode != CameraMode.FirstPerson && camera.PreviousMode != CameraMode.SdkCamera;
if (camera.PreviousMode == CameraMode.FirstPerson)
{
cinemachinePreset.ThirdPersonCameraData.Camera.m_XAxis.Value = cinemachinePreset.FirstPersonCameraData.POV.m_HorizontalAxis.Value;
@@ -239,14 +239,14 @@ private void HandleInputBlock(CameraMode targetCameraMode, CameraMode currentCam
if (targetCameraMode == CameraMode.Free)
{
ref InputMapComponent inputMapComponent = ref inputMap.GetInputMapComponent(World);
- inputMapComponent.UnblockInput(InputMapComponent.Kind.FREE_CAMERA);
- inputMapComponent.BlockInput(InputMapComponent.Kind.PLAYER);
+ inputMapComponent.UnblockInput(InputMapComponent.Kind.FreeCamera);
+ inputMapComponent.BlockInput(InputMapComponent.Kind.Player);
}
else if (currentCameraMode == CameraMode.Free)
{
ref InputMapComponent inputMapComponent = ref inputMap.GetInputMapComponent(World);
- inputMapComponent.UnblockInput(InputMapComponent.Kind.PLAYER);
- inputMapComponent.BlockInput(InputMapComponent.Kind.FREE_CAMERA);
+ inputMapComponent.UnblockInput(InputMapComponent.Kind.Player);
+ inputMapComponent.BlockInput(InputMapComponent.Kind.FreeCamera);
}
}
diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/UpdateCameraInputSystem.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/UpdateCameraInputSystem.cs
index 92ca227d7b0..0efe467a83e 100644
--- a/Explorer/Assets/DCL/Character/CharacterCamera/Systems/UpdateCameraInputSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterCamera/Systems/UpdateCameraInputSystem.cs
@@ -70,7 +70,7 @@ private void UpdateInput(ref CameraInput cameraInput, ref CursorComponent cursor
if (currentDelta.sqrMagnitude > CURSOR_DIRTY_THRESHOLD)
cursorComponent.PositionIsDirty = true;
- cameraInput.Delta = cursorComponent.CursorState != CursorState.Free && cursorComponent.CursorState != CursorState.LockedWithUI ? currentDelta : Vector2.zero;
+ cameraInput.Delta = cursorComponent.CursorState != CursorState.Free && cursorComponent.CursorState != CursorState.LockedWithUi ? currentDelta : Vector2.zero;
}
if (!freeCameraActions.enabled)
diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/ApplyCinemachineCameraInputSystemShould.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/ApplyCinemachineCameraInputSystemShould.cs
index 879849f053f..37aad7c8691 100644
--- a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/ApplyCinemachineCameraInputSystemShould.cs
+++ b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/ApplyCinemachineCameraInputSystemShould.cs
@@ -262,7 +262,7 @@ public void IgnoreCameraLookAtIntentForSDKCamera()
// Arrange
Vector3 lookAtTarget = new Vector3(10, 0, 10);
Vector3 playerPosition = Vector3.zero;
- world.Set(entity, new CameraComponent(camera) { Mode = CameraMode.SDKCamera });
+ world.Set(entity, new CameraComponent(camera) { Mode = CameraMode.SdkCamera });
world.Add(entity, new CameraLookAtIntent(lookAtTarget, playerPosition));
// Act
diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/CinemachineVirtualCameraSystemShould.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/CinemachineVirtualCameraSystemShould.cs
index 3c0cd1e9716..829e20df1ca 100644
--- a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/CinemachineVirtualCameraSystemShould.cs
+++ b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/CinemachineVirtualCameraSystemShould.cs
@@ -75,7 +75,7 @@ public void CreateCameraSetup()
cinemachinePreset.DefaultCameraMode.Returns(CameraMode.ThirdPerson);
cinemachineCameraAudioSettings = Substitute.For();
system = new ControlCinemachineVirtualCameraSystem(world, cinemachineCameraAudioSettings);
- world.Create(new InputMapComponent(InputMapComponent.Kind.PLAYER | InputMapComponent.Kind.CAMERA | InputMapComponent.Kind.SHORTCUTS));
+ world.Create(new InputMapComponent(InputMapComponent.Kind.Player | InputMapComponent.Kind.Camera | InputMapComponent.Kind.Shortcuts));
inputMap = world.CacheInputMap();
@@ -93,7 +93,7 @@ public void DisposeCameraSetup()
[Test]
public void InitInputMapComponent()
{
- Assert.That(inputMap.GetInputMapComponent(world).Active, Is.EqualTo(InputMapComponent.Kind.PLAYER | InputMapComponent.Kind.CAMERA | InputMapComponent.Kind.SHORTCUTS));
+ Assert.That(inputMap.GetInputMapComponent(world).Active, Is.EqualTo(InputMapComponent.Kind.Player | InputMapComponent.Kind.Camera | InputMapComponent.Kind.Shortcuts));
Assert.That(world.Get(entity).CurrentCamera, Is.EqualTo(thirdPersonCameraData.Camera));
}
@@ -233,10 +233,10 @@ public void AdaptToCameraModeFromComponent(bool lockInput)
public void SwitchFromSDKCameraToThirdPerson()
{
CameraComponent component = world.Get(entity);
- component.Mode = CameraMode.SDKCamera;
+ component.Mode = CameraMode.SdkCamera;
world.Set(entity, component);
- Assert.That(component.Mode, Is.EqualTo(CameraMode.SDKCamera));
+ Assert.That(component.Mode, Is.EqualTo(CameraMode.SdkCamera));
Assert.That(world.Get(entity).CurrentCamera, Is.EqualTo(thirdPersonCameraData.Camera));
component.Mode = CameraMode.ThirdPerson;
diff --git a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/UpdateCursorInputSystemShould.cs b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/UpdateCursorInputSystemShould.cs
index 77847149c1a..0daa7ff354d 100644
--- a/Explorer/Assets/DCL/Character/CharacterCamera/Tests/UpdateCursorInputSystemShould.cs
+++ b/Explorer/Assets/DCL/Character/CharacterCamera/Tests/UpdateCursorInputSystemShould.cs
@@ -199,7 +199,7 @@ public void DisallowPanningWhenInSDKCameraMode()
// Arrange
world.Set(entity, new CursorComponent { CursorState = CursorState.Free, PositionIsDirty = true });
ref var cameraData = ref world.Get(entity);
- cameraData.CameraMode = CameraMode.SDKCamera;
+ cameraData.CameraMode = CameraMode.SdkCamera;
Press(mouse.leftButton); // Temporal lock
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Animation/AnimationStatesLogic.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Animation/AnimationStatesLogic.cs
index 77c2dae2b78..86053e956b9 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Animation/AnimationStatesLogic.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Animation/AnimationStatesLogic.cs
@@ -27,7 +27,7 @@ public static void Execute(float dt,
float verticalVelocity = rigidTransform.GravityVelocity.y + velocity.y + rigidTransform.ExternalVelocity.y;
bool jumpTriggered = jumpState.JumpCount > animationComponent.States.JumpCount;
- bool glidingTriggered = glideState.Value == GlideStateValue.OPENING_PROP && animationComponent.States.GlideState != GlideStateValue.OPENING_PROP;
+ bool glidingTriggered = glideState.Value == GlideStateValue.OpeningProp && animationComponent.States.GlideState != GlideStateValue.OpeningProp;
animationComponent.States.IsGrounded = isGrounded;
animationComponent.States.JumpCount = jumpState.JumpCount;
@@ -63,7 +63,7 @@ public static void SetAnimatorParameters(IAvatarView view, in AnimationStates st
view.SetAnimatorBool(AnimationHashes.FALLING, states.IsFalling);
view.SetAnimatorBool(AnimationHashes.LONG_FALL, states.IsLongFall);
view.SetAnimatorBool(AnimationHashes.STUNNED, states.IsStunned);
- view.SetAnimatorBool(AnimationHashes.GLIDING, states.GlideState is GlideStateValue.OPENING_PROP or GlideStateValue.GLIDING);
+ view.SetAnimatorBool(AnimationHashes.GLIDING, states.GlideState is GlideStateValue.OpeningProp or GlideStateValue.Gliding);
view.SetAnimatorFloat(AnimationHashes.GLIDE_BLEND, states.GlideBlendValue);
if (jumpTriggered)
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Animation/AvatarAnimationEventsHandler.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Animation/AvatarAnimationEventsHandler.cs
index 6e4a7d8deb9..404afea5caa 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Animation/AvatarAnimationEventsHandler.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Animation/AvatarAnimationEventsHandler.cs
@@ -24,18 +24,18 @@ public class AvatarAnimationEventsHandler : MonoBehaviour
private static readonly Dictionary<(MovementKind, AvatarAnimationEventType), AvatarAudioClipType> AUDIO_CLIP_LOOKUP = new()
{
- { (MovementKind.RUN, AvatarAnimationEventType.Jump), AvatarAudioClipType.JumpStartRun },
- { (MovementKind.RUN, AvatarAnimationEventType.Land), AvatarAudioClipType.JumpLandRun },
- { (MovementKind.RUN, AvatarAnimationEventType.Step), AvatarAudioClipType.StepRun },
- { (MovementKind.JOG, AvatarAnimationEventType.Jump), AvatarAudioClipType.JumpStartJog },
- { (MovementKind.JOG, AvatarAnimationEventType.Land), AvatarAudioClipType.JumpLandJog },
- { (MovementKind.JOG, AvatarAnimationEventType.Step), AvatarAudioClipType.StepJog },
- { (MovementKind.WALK, AvatarAnimationEventType.Jump), AvatarAudioClipType.JumpStartWalk },
- { (MovementKind.WALK, AvatarAnimationEventType.Land), AvatarAudioClipType.JumpLandWalk },
- { (MovementKind.WALK, AvatarAnimationEventType.Step), AvatarAudioClipType.StepWalk },
- { (MovementKind.IDLE, AvatarAnimationEventType.Jump), AvatarAudioClipType.JumpStartWalk },
- { (MovementKind.IDLE, AvatarAnimationEventType.Land), AvatarAudioClipType.JumpLandWalk },
- { (MovementKind.IDLE, AvatarAnimationEventType.Step), AvatarAudioClipType.StepWalk },
+ { (MovementKind.Run, AvatarAnimationEventType.Jump), AvatarAudioClipType.JumpStartRun },
+ { (MovementKind.Run, AvatarAnimationEventType.Land), AvatarAudioClipType.JumpLandRun },
+ { (MovementKind.Run, AvatarAnimationEventType.Step), AvatarAudioClipType.StepRun },
+ { (MovementKind.Jog, AvatarAnimationEventType.Jump), AvatarAudioClipType.JumpStartJog },
+ { (MovementKind.Jog, AvatarAnimationEventType.Land), AvatarAudioClipType.JumpLandJog },
+ { (MovementKind.Jog, AvatarAnimationEventType.Step), AvatarAudioClipType.StepJog },
+ { (MovementKind.Walk, AvatarAnimationEventType.Jump), AvatarAudioClipType.JumpStartWalk },
+ { (MovementKind.Walk, AvatarAnimationEventType.Land), AvatarAudioClipType.JumpLandWalk },
+ { (MovementKind.Walk, AvatarAnimationEventType.Step), AvatarAudioClipType.StepWalk },
+ { (MovementKind.Idle, AvatarAnimationEventType.Jump), AvatarAudioClipType.JumpStartWalk },
+ { (MovementKind.Idle, AvatarAnimationEventType.Land), AvatarAudioClipType.JumpLandWalk },
+ { (MovementKind.Idle, AvatarAnimationEventType.Step), AvatarAudioClipType.StepWalk },
{ (ANY_KIND, AvatarAnimationEventType.AirJump), AvatarAudioClipType.AirJump },
};
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Animation/GliderPropAnimationLogic.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Animation/GliderPropAnimationLogic.cs
index 20e372f38a9..14eee423f07 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Animation/GliderPropAnimationLogic.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Animation/GliderPropAnimationLogic.cs
@@ -8,7 +8,7 @@ public static class GliderPropAnimationLogic
{
public static void Execute(Animator animator, in CharacterAnimationComponent animationComponent, GlideStateValue glideState)
{
- bool isGliding = glideState is GlideStateValue.OPENING_PROP or GlideStateValue.GLIDING;
+ bool isGliding = glideState is GlideStateValue.OpeningProp or GlideStateValue.Gliding;
animator.SetFloat(AnimationHashes.MOVEMENT_BLEND, animationComponent.States.MovementBlendValue);
animator.SetBool(AnimationHashes.GLIDING, isGliding);
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Components/GlideState.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Components/GlideState.cs
index 7c9f4b36255..dedf2d422ca 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Components/GlideState.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Components/GlideState.cs
@@ -11,9 +11,9 @@ public struct GlideState
public enum GlideStateValue
{
- PROP_CLOSED,
- OPENING_PROP,
- GLIDING,
- CLOSING_PROP
+ PropClosed,
+ OpeningProp,
+ Gliding,
+ ClosingProp
}
}
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Components/MovementKind.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Components/MovementKind.cs
index feeb4a6b9eb..22a4006f558 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Components/MovementKind.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Components/MovementKind.cs
@@ -3,15 +3,15 @@ namespace DCL.CharacterMotion.Components
// Number defines movement blend id in animator
public enum MovementKind : byte
{
- IDLE = 0,
- WALK = 1,
- JOG = 2,
- RUN = 3,
+ Idle = 0,
+ Walk = 1,
+ Jog = 2,
+ Run = 3,
}
public static class MovementBlend
{
- public const byte MIN = (byte)MovementKind.IDLE;
- public const byte MAX = (byte)MovementKind.RUN;
+ public const byte MIN = (byte)MovementKind.Idle;
+ public const byte MAX = (byte)MovementKind.Run;
}
}
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Settings/OverridableCharacterControllerSettings.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Settings/OverridableCharacterControllerSettings.cs
index 3f029dcca73..b3330f6fe11 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Settings/OverridableCharacterControllerSettings.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Settings/OverridableCharacterControllerSettings.cs
@@ -26,19 +26,19 @@ private float GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID id, float
public float WalkSpeed
{
- get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.WALK_SPEED, impl.WalkSpeed);
+ get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.WalkSpeed, impl.WalkSpeed);
set => impl.WalkSpeed = value;
}
public float JogSpeed
{
- get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.JOG_SPEED, impl.JogSpeed);
+ get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.JogSpeed, impl.JogSpeed);
set => impl.JogSpeed = value;
}
public float RunSpeed
{
- get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.RUN_SPEED, impl.RunSpeed);
+ get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.RunSpeed, impl.RunSpeed);
set => impl.RunSpeed = value;
}
@@ -62,13 +62,13 @@ public float Gravity
public float JogJumpHeight
{
- get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.JUMP_HEIGHT, impl.JogJumpHeight);
+ get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.JumpHeight, impl.JogJumpHeight);
set => impl.JogJumpHeight = value;
}
public float RunJumpHeight
{
- get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.RUN_JUMP_HEIGHT, impl.RunJumpHeight);
+ get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.RunJumpHeight, impl.RunJumpHeight);
set => impl.RunJumpHeight = value;
}
@@ -120,7 +120,7 @@ public int AirJumpCount
public float AirJumpHeight
{
- get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.DOUBLE_JUMP_HEIGHT, impl.AirJumpHeight);
+ get => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.DoubleJumpHeight, impl.AirJumpHeight);
set => impl.AirJumpHeight = value;
}
@@ -148,11 +148,11 @@ public float AirJumpDirectionChangeImpulse
set => impl.AirJumpDirectionChangeImpulse = value;
}
- public float GlideSpeed => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.GLIDE_SPEED, impl.GlideSpeed);
+ public float GlideSpeed => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.GlideSpeed, impl.GlideSpeed);
public float GlideMinGroundDistance => impl.GlideMinGroundDistance;
- public float GlideMaxGravity => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.GLIDE_MAX_GRAVITY, impl.GlideMaxGravity);
+ public float GlideMaxGravity => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.GlideMaxGravity, impl.GlideMaxGravity);
public float GlideWindResponse => impl.GlideWindResponse;
@@ -168,7 +168,7 @@ public float AirJumpDirectionChangeImpulse
public float JumpHeightStun => impl.JumpHeightStun;
- public float LongFallStunTime => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.HARD_LANDING_COOLDOWN, impl.LongFallStunTime);
+ public float LongFallStunTime => GetOverrideOrValue(AvatarLocomotionOverrides.OverrideID.HardLandingCooldown, impl.LongFallStunTime);
public float NoSlipDistance => impl.NoSlipDistance;
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateCameraFovSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateCameraFovSystem.cs
index f44807d8aea..8af4663c913 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateCameraFovSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateCameraFovSystem.cs
@@ -36,7 +36,7 @@ private void Interpolate(
in MovementInputComponent movementInput,
in GlideState glideState)
{
- if (movementInput.Kind == MovementKind.RUN && glideState.Value == GlideStateValue.PROP_CLOSED)
+ if (movementInput.Kind == MovementKind.Run && glideState.Value == GlideStateValue.PropClosed)
{
float speedFactor = rigidTransform.MoveVelocity.Velocity.magnitude / characterControllerSettings.RunSpeed;
float targetFov = Mathf.Lerp(0, characterControllerSettings.CameraFOVWhileRunning, speedFactor);
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateSpeedLimitSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateSpeedLimitSystem.cs
index 8de9541b052..b819f7177c1 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateSpeedLimitSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/CalculateSpeedLimitSystem.cs
@@ -31,7 +31,7 @@ protected override void Update(float t)
[None(typeof(RandomAvatar))]
private void ComputeLocalAvatarSpeedLimit(in ICharacterControllerSettings settings, in MovementInputComponent movementInput, in GlideState glideState, ref MovementSpeedLimit speedLimit)
{
- if (glideState.Value == GlideStateValue.GLIDING)
+ if (glideState.Value == GlideStateValue.Gliding)
{
speedLimit.Value = settings.GlideSpeed;
return;
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/GliderPropControllerSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/GliderPropControllerSystem.cs
index cf1128f96b2..a7a1d3b6082 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/GliderPropControllerSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/GliderPropControllerSystem.cs
@@ -141,7 +141,7 @@ private void RemoteDisableProp(Entity entity, in GliderProp gliderProp, in Inter
private void EnableProp(Entity entity, in GliderProp gliderProp, GlideStateValue glideState)
{
- if (glideState == GlideStateValue.PROP_CLOSED) return;
+ if (glideState == GlideStateValue.PropClosed) return;
gliderProp.View.gameObject.SetActive(true);
World.Add(entity);
@@ -149,7 +149,7 @@ private void EnableProp(Entity entity, in GliderProp gliderProp, GlideStateValue
private void DisableProp(Entity entity, in GliderProp gliderProp, GlideStateValue glideState)
{
- if (glideState != GlideStateValue.PROP_CLOSED) return;
+ if (glideState != GlideStateValue.PropClosed) return;
gliderProp.View.PrepareForNextActivation();
gliderProp.View.gameObject.SetActive(false);
@@ -187,12 +187,12 @@ private void HandleStateTransition([Data] int tick, ref GlideState glideState, i
{
switch (glideState.Value)
{
- case GlideStateValue.OPENING_PROP when gliderProp.View.OpenAnimationCompleted:
- glideState.Value = GlideStateValue.GLIDING;
+ case GlideStateValue.OpeningProp when gliderProp.View.OpenAnimationCompleted:
+ glideState.Value = GlideStateValue.Gliding;
break;
- case GlideStateValue.CLOSING_PROP when gliderProp.View.CloseAnimationCompleted:
- glideState.Value = GlideStateValue.PROP_CLOSED;
+ case GlideStateValue.ClosingProp when gliderProp.View.CloseAnimationCompleted:
+ glideState.Value = GlideStateValue.PropClosed;
glideState.CooldownStartedTick = tick;
break;
}
@@ -217,7 +217,7 @@ private void LocalUpdateTrail(in GliderProp gliderProp, in GlideState glideState
{
float thresholdSq = glidingSettings.TrailVelocityThreshold * glidingSettings.TrailVelocityThreshold;
Vector3 velocity = rigidTransform.MoveVelocity.Velocity;
- gliderProp.View.TrailEnabled = glideState.Value == GlideStateValue.GLIDING && velocity.sqrMagnitude > thresholdSq;
+ gliderProp.View.TrailEnabled = glideState.Value == GlideStateValue.Gliding && velocity.sqrMagnitude > thresholdSq;
}
[Query]
@@ -240,7 +240,7 @@ private void RemoteUpdateEngineState([Data] float dt, in CharacterAnimationCompo
private void UpdateEngineState(in GlideStateValue glideState, in GliderProp gliderProp, in Vector3 velocity, float dt)
{
- if (glideState != GlideStateValue.GLIDING)
+ if (glideState != GlideStateValue.Gliding)
{
gliderProp.View.UpdateEngineState(false, 0, dt);
return;
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/HeadIKSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/HeadIKSystem.cs
index ae8cbcc5fa6..c93bd4bc8e4 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/HeadIKSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/HeadIKSystem.cs
@@ -83,7 +83,7 @@ protected override void Update(float t)
UpdateIKQuery(World, t, in camera.GetCameraComponent(World), World.Has(camera));
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.HEAD_SYNC) && playerEntity != Entity.Null && World.TryGet(playerEntity, out var playerTransform))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.HeadSync) && playerEntity != Entity.Null && World.TryGet(playerEntity, out var playerTransform))
UpdateRemoteIKQuery(World, t, playerTransform.Position);
}
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/MovePlayerWithDurationSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/MovePlayerWithDurationSystem.cs
index 3da7ad9c479..b97cecf96a5 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/MovePlayerWithDurationSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/MovePlayerWithDurationSystem.cs
@@ -34,7 +34,7 @@ protected override void Update(float t)
[Query]
private void InterruptMovementOnInput(Entity entity, in MovementInputComponent movementInputComponent, in JumpInputComponent jumpInputComponent, ref PlayerMoveToWithDurationIntent moveIntent, CharacterPlatformComponent platformComponent)
{
- bool hasMovementInput = movementInputComponent.Kind != MovementKind.IDLE && movementInputComponent.Axes != Vector2.zero;
+ bool hasMovementInput = movementInputComponent.Kind != MovementKind.Idle && movementInputComponent.Axes != Vector2.zero;
bool hasJumpInput = jumpInputComponent.IsPressed;
if (!hasMovementInput && !hasJumpInput)
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/PointAtMarkerSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/PointAtMarkerSystem.cs
index 961cb70b44e..8a4cf90b6c5 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/PointAtMarkerSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/PointAtMarkerSystem.cs
@@ -89,8 +89,8 @@ private void SpawnMarker(
if (!pointAt.IsPointing
|| string.IsNullOrEmpty(profile.UserId)
- || (visibilitySetting == PointAtMarkerVisibilitySettings.VisibilitySetting.NONE && !isLocalPlayer)
- || (visibilitySetting == PointAtMarkerVisibilitySettings.VisibilitySetting.FRIENDS_ONLY && !isLocalPlayer && (friendsCache == null || !friendsCache.Contains(profile.UserId))))
+ || (visibilitySetting == PointAtMarkerVisibilitySettings.VisibilitySetting.None && !isLocalPlayer)
+ || (visibilitySetting == PointAtMarkerVisibilitySettings.VisibilitySetting.FriendsOnly && !isLocalPlayer && (friendsCache == null || !friendsCache.Contains(profile.UserId))))
return;
float distanceSqr = (pointAt.WorldHitPoint - avatarBase.transform.position).sqrMagnitude;
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/StunCharacterSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/StunCharacterSystem.cs
index 8df979c7a28..20615e2d006 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/StunCharacterSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/StunCharacterSystem.cs
@@ -50,7 +50,7 @@ private static void UpdateNotStunned(float currentTime,
{
Vector3 currentPosition = characterController.transform.position;
- if (glideState.Value == GlideStateValue.GLIDING)
+ if (glideState.Value == GlideStateValue.Gliding)
{
// Reset fall height if gliding
stunComponent.TopUngroundedHeight = currentPosition.y;
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputJumpSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputJumpSystem.cs
index 6bf4e44d139..dfd35b6f54c 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputJumpSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputJumpSystem.cs
@@ -50,8 +50,8 @@ private void UpdateInput([Data] int tickValue, ref JumpInputComponent inputToUpd
bool isNormalJump = jumpState.JumpCount == 0;
bool disableJump = inputModifierComponent.DisableJump;
- bool disableDoubleJump = inputModifierComponent.DisableDoubleJump || !FeaturesRegistry.Instance.IsEnabled(FeatureId.DOUBLE_JUMP);
- bool disableGliding = inputModifierComponent.DisableGliding || !FeaturesRegistry.Instance.IsEnabled(FeatureId.GLIDING);
+ bool disableDoubleJump = inputModifierComponent.DisableDoubleJump || !FeaturesRegistry.Instance.IsEnabled(FeatureId.DoubleJump);
+ bool disableGliding = inputModifierComponent.DisableGliding || !FeaturesRegistry.Instance.IsEnabled(FeatureId.Gliding);
if (disableJump && isNormalJump)
// Trying to do a normal (ground) jump but jumping is disabled.
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputMovementSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputMovementSystem.cs
index beea9d90387..5f82d4bd18b 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputMovementSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdateInputMovementSystem.cs
@@ -42,7 +42,7 @@ private void UpdateInput(ref MovementInputComponent inputToUpdate, in InputModif
inputToUpdate.Axes = movementAxis.ReadValue();
if (inputToUpdate.Axes == Vector2.zero)
- inputToUpdate.Kind = MovementKind.IDLE;
+ inputToUpdate.Kind = MovementKind.Idle;
else
{
bool runPressed = sprintAction.IsPressed();
@@ -58,28 +58,28 @@ private static MovementKind ProcessInputMovementKind(InputModifierComponent inpu
if (runPressed)
{
if (inputModifierComponent.DisableRun)
- return inputModifierComponent.DisableJog ? MovementKind.WALK : MovementKind.JOG;
+ return inputModifierComponent.DisableJog ? MovementKind.Walk : MovementKind.Jog;
- return MovementKind.RUN;
+ return MovementKind.Run;
}
if (walkPressed)
{
if (inputModifierComponent.DisableWalk)
- return inputModifierComponent.DisableJog ? MovementKind.RUN : MovementKind.JOG;
+ return inputModifierComponent.DisableJog ? MovementKind.Run : MovementKind.Jog;
- return MovementKind.WALK;
+ return MovementKind.Walk;
}
if (inputModifierComponent.DisableJog)
{
if (inputModifierComponent.DisableWalk)
- return MovementKind.RUN;
+ return MovementKind.Run;
- return MovementKind.WALK;
+ return MovementKind.Walk;
}
- return MovementKind.JOG;
+ return MovementKind.Jog;
}
}
}
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdatePointAndClickInputSystem.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdatePointAndClickInputSystem.cs
index d43ed73c6e0..1c0cd4f9e35 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdatePointAndClickInputSystem.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Systems/UpdatePointAndClickInputSystem.cs
@@ -217,7 +217,7 @@ private void DriveMovement(
in ICharacterControllerSettings settings)
{
// Cancel when the player takes manual control
- bool hasManualMovement = movementInput.Kind != MovementKind.IDLE
+ bool hasManualMovement = movementInput.Kind != MovementKind.Idle
|| movementInput.Axes != Vector2.zero;
if (hasManualMovement)
@@ -235,7 +235,7 @@ private void DriveMovement(
if (xzDistance <= settings.PointAndClickArrivalDistance)
{
movementInput.Axes = Vector2.zero;
- movementInput.Kind = MovementKind.IDLE;
+ movementInput.Kind = MovementKind.Idle;
entitiesToCancelNavigation.Add(entity);
return;
}
@@ -252,7 +252,7 @@ private void DriveMovement(
if (xzMoved < settings.PointAndClickStuckMinMovement)
{
movementInput.Axes = Vector2.zero;
- movementInput.Kind = MovementKind.IDLE;
+ movementInput.Kind = MovementKind.Idle;
entitiesToCancelNavigation.Add(entity);
return;
}
@@ -271,11 +271,11 @@ private void DriveMovement(
// Honour sprint/walk modifier keys the same way UpdateInputMovementSystem does
if (sprintAction.IsPressed())
- movementInput.Kind = MovementKind.RUN;
+ movementInput.Kind = MovementKind.Run;
else if (walkAction.IsPressed())
- movementInput.Kind = MovementKind.WALK;
+ movementInput.Kind = MovementKind.Walk;
else
- movementInput.Kind = MovementKind.JOG;
+ movementInput.Kind = MovementKind.Jog;
}
}
}
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/ApplyExternalForceShould.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/ApplyExternalForceShould.cs
index 895f2e29bc7..6bf198c0af1 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/ApplyExternalForceShould.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/ApplyExternalForceShould.cs
@@ -36,7 +36,7 @@ public void ComputeAccelerationFromForce()
{
CharacterRigidTransform rigidTransform = WithExternalForce(new Vector3(10f, 20f, 0f));
- var glideState = new GlideState { Value = GlideStateValue.PROP_CLOSED };
+ var glideState = new GlideState { Value = GlideStateValue.PropClosed };
ApplyExternalForce.Execute(settings, ref rigidTransform, glideState, DT);
@@ -49,7 +49,7 @@ public void MultiplyAccelerationWhileGliding()
{
CharacterRigidTransform rigidTransform = WithExternalForce(new Vector3(10f, 20f, 0f));
- var glideState = new GlideState { Value = GlideStateValue.GLIDING };
+ var glideState = new GlideState { Value = GlideStateValue.Gliding };
ApplyExternalForce.Execute(settings, ref rigidTransform, glideState, DT);
@@ -62,7 +62,7 @@ public void IntegrateOnlyHorizontalVelocity()
{
CharacterRigidTransform rigidTransform = WithExternalForce(new Vector3(10f, 20f, 5f));
- var glideState = new GlideState { Value = GlideStateValue.GLIDING };
+ var glideState = new GlideState { Value = GlideStateValue.Gliding };
ApplyExternalForce.Execute(settings, ref rigidTransform, glideState, DT);
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/ApplyGlidingShould.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/ApplyGlidingShould.cs
index 783ba67ef0a..5d694f5e6a4 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/ApplyGlidingShould.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/ApplyGlidingShould.cs
@@ -31,7 +31,7 @@ public void ClampFallSpeedWhileGliding()
Execute(rigidTransform, ref glideState);
Assert.IsTrue(Mathf.Approximately(-GLIDE_MAX_GRAVITY, rigidTransform.GravityVelocity.y), "Fall speed is clamped to GlideMaxGravity");
- Assert.AreEqual(GlideStateValue.GLIDING, glideState.Value);
+ Assert.AreEqual(GlideStateValue.Gliding, glideState.Value);
}
[Test]
@@ -76,6 +76,6 @@ private static CharacterRigidTransform GlidingRigidTransform() =>
};
private static GlideState GlidingState() =>
- new () { Value = GlideStateValue.GLIDING };
+ new () { Value = GlideStateValue.Gliding };
}
}
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/CoyoteTimerShould.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/CoyoteTimerShould.cs
index 5420b381311..760b022ad60 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/CoyoteTimerShould.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/CoyoteTimerShould.cs
@@ -140,7 +140,7 @@ private void SetupFallingPlayer()
jumpInputComponent = new JumpInputComponent();
movementInputComponent = new MovementInputComponent()
{
- Kind = MovementKind.JOG
+ Kind = MovementKind.Jog
};
}
}
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/MovePlayerWithDurationSystemShould.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/MovePlayerWithDurationSystemShould.cs
index 823614307f5..e33e877fff4 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Tests/MovePlayerWithDurationSystemShould.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Tests/MovePlayerWithDurationSystemShould.cs
@@ -47,7 +47,7 @@ private Entity CreatePlayerEntity(
var characterTransform = new CharacterTransform(characterGameObject.transform);
var rigidTransform = new CharacterRigidTransform();
var animationComponent = new CharacterAnimationComponent();
- var movementInput = new MovementInputComponent { Kind = MovementKind.IDLE, Axes = Vector2.zero };
+ var movementInput = new MovementInputComponent { Kind = MovementKind.Idle, Axes = Vector2.zero };
var jumpInput = new JumpInputComponent { IsPressed = false };
completionSource ??= new UniTaskCompletionSource();
var moveIntent = new PlayerMoveToWithDurationIntent(startPosition, targetPosition, cameraTarget, avatarTarget, completionSource, duration);
@@ -170,7 +170,7 @@ public void InterruptMovementOnMovementInput()
Assert.That(world.Has(e), Is.True);
// Simulate movement input
- world.Set(e, new MovementInputComponent { Kind = MovementKind.JOG, Axes = new Vector2(1, 0) });
+ world.Set(e, new MovementInputComponent { Kind = MovementKind.Jog, Axes = new Vector2(1, 0) });
// Update should detect input and remove intent
system.Update(0.1f);
@@ -367,7 +367,7 @@ public void SetCompletionSourceToFalseOnMovementInputInterruption()
system.Update(0.1f);
// Simulate movement input to interrupt
- world.Set(e, new MovementInputComponent { Kind = MovementKind.JOG, Axes = new Vector2(1, 0) });
+ world.Set(e, new MovementInputComponent { Kind = MovementKind.Jog, Axes = new Vector2(1, 0) });
// Update should detect input and interrupt
system.Update(0.1f);
@@ -449,7 +449,7 @@ public void ClearPlatformOnMovementInputInterruption()
system.Update(0.1f);
// Act
- world.Set(e, new MovementInputComponent { Kind = MovementKind.JOG, Axes = new Vector2(1, 0) });
+ world.Set(e, new MovementInputComponent { Kind = MovementKind.Jog, Axes = new Vector2(1, 0) });
system.Update(0.1f);
// Assert
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Utils/MovementSpeedLimitHelper.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Utils/MovementSpeedLimitHelper.cs
index 164a8868820..7be0a1bc799 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Utils/MovementSpeedLimitHelper.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Utils/MovementSpeedLimitHelper.cs
@@ -10,8 +10,8 @@ public static class MovementSpeedLimitHelper
public static float GetMovementSpeedLimit(ICharacterControllerSettings settings, MovementKind movementKind) =>
movementKind switch
{
- MovementKind.RUN => settings.RunSpeed,
- MovementKind.JOG => settings.JogSpeed,
+ MovementKind.Run => settings.RunSpeed,
+ MovementKind.Jog => settings.JogSpeed,
_ => settings.WalkSpeed
};
@@ -19,8 +19,8 @@ public static float GetMovementSpeedLimit(ICharacterControllerSettings settings,
public static float GetAnimationBlendingSpeedLimit(ICharacterControllerSettings settings, MovementKind movementKind) =>
movementKind switch
{
- MovementKind.RUN => settings.MoveAnimBlendMaxRunSpeed,
- MovementKind.JOG => settings.MoveAnimBlendMaxJogSpeed,
+ MovementKind.Run => settings.MoveAnimBlendMaxRunSpeed,
+ MovementKind.Jog => settings.MoveAnimBlendMaxJogSpeed,
_ => settings.MoveAnimBlendMaxWalkSpeed
};
}
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyExternalForce.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyExternalForce.cs
index 3cc7cfa0284..0053e8bc35d 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyExternalForce.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyExternalForce.cs
@@ -25,7 +25,7 @@ public static void Execute(ICharacterControllerSettings settings, ref CharacterR
characterPhysics.ExternalAcceleration = characterPhysics.ExternalForce / settings.CharacterMass;
// An open glider catches the airflow with a larger effective area, so continuous external forces act on it stronger
- if (glideState.Value == GlideStateValue.GLIDING)
+ if (glideState.Value == GlideStateValue.Gliding)
characterPhysics.ExternalAcceleration *= settings.GlideWindResponse;
// v += a * dt (Vertical acceleration is read by ApplyGravity via ExternalAcceleration.y)
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyGliding.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyGliding.cs
index ec0b8fb3241..a3dbfce8431 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyGliding.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyGliding.cs
@@ -34,20 +34,20 @@ public static void Execute(in ICharacterControllerSettings settings,
// Once the 'ready' flag becomes true the actual gliding sequence starts
bool enoughTimeSinceLastJump = (physicsTick - jumpInput.Trigger.TickWhenJumpWasConsumed) * dt >= settings.JumpToGlideTimeInterval;
bool coolingDown = (physicsTick - glideState.CooldownStartedTick) * dt < settings.GlideCooldown;
- bool readyToStartGliding = enoughTimeSinceLastJump && !coolingDown && glideState.Value == GlideStateValue.PROP_CLOSED;
+ bool readyToStartGliding = enoughTimeSinceLastJump && !coolingDown && glideState.Value == GlideStateValue.PropClosed;
// Start gliding if want, can and ready
if (glideState.WantsToGlide && canTriggerGliding && readyToStartGliding)
{
- glideState.Value = GlideStateValue.OPENING_PROP;
+ glideState.Value = GlideStateValue.OpeningProp;
return;
}
- if (glideState.Value == GlideStateValue.GLIDING)
+ if (glideState.Value == GlideStateValue.Gliding)
{
if (!jumpInput.IsPressed || !canTriggerGliding)
// Stop gliding if the jump button is released or any other condition prevents it
- glideState.Value = GlideStateValue.CLOSING_PROP;
+ glideState.Value = GlideStateValue.ClosingProp;
else
// Otherwise clamp the fall speed only: upward velocity (jump momentum, external forces like wind) must pass through untouched
rigidTransform.GravityVelocity.y = Mathf.Max(rigidTransform.GravityVelocity.y, -settings.GlideMaxGravity);
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyJump.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyJump.cs
index 9b5cb3e8bff..5f79e9e078f 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyJump.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyJump.cs
@@ -130,10 +130,10 @@ private static float GetJumpHeight(ICharacterControllerSettings settings,
float minJumpHeight = settings.JogJumpHeight;
float maxJumpHeight = movementInput.Kind switch
{
- MovementKind.WALK => settings.JogJumpHeight,
- MovementKind.JOG => settings.JogJumpHeight,
- MovementKind.IDLE => settings.JogJumpHeight,
- MovementKind.RUN => settings.RunJumpHeight,
+ MovementKind.Walk => settings.JogJumpHeight,
+ MovementKind.Jog => settings.JogJumpHeight,
+ MovementKind.Idle => settings.JogJumpHeight,
+ MovementKind.Run => settings.RunJumpHeight,
_ => throw new ArgumentOutOfRangeException(),
};
diff --git a/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplySlopeModifier.cs b/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplySlopeModifier.cs
index 71cb0b404a9..ad16db83bf2 100644
--- a/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplySlopeModifier.cs
+++ b/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplySlopeModifier.cs
@@ -37,7 +37,7 @@ public static Vector3 Execute(
direction = Vector3.down,
};
- float downwardsSlopeDistance = input.Kind == MovementKind.RUN ? settings.DownwardsSlopeRunRaycastDistance : settings.DownwardsSlopeJogRaycastDistance;
+ float downwardsSlopeDistance = input.Kind == MovementKind.Run ? settings.DownwardsSlopeRunRaycastDistance : settings.DownwardsSlopeJogRaycastDistance;
if (!DCLPhysics.Raycast(ray, out RaycastHit hit, downwardsSlopeDistance, PhysicsLayers.CHARACTER_ONLY_MASK, QueryTriggerInteraction.Ignore))
return Vector3.zero;
diff --git a/Explorer/Assets/DCL/Character/CharacterObject/Tests/CharacterTransformDirtyFlagShould.cs b/Explorer/Assets/DCL/Character/CharacterObject/Tests/CharacterTransformDirtyFlagShould.cs
index caf987d5ca9..7e58db7e36c 100644
--- a/Explorer/Assets/DCL/Character/CharacterObject/Tests/CharacterTransformDirtyFlagShould.cs
+++ b/Explorer/Assets/DCL/Character/CharacterObject/Tests/CharacterTransformDirtyFlagShould.cs
@@ -371,7 +371,7 @@ public void SetsDirtyCharacterTransformViaRemotePlayersMovementSystem()
rotationY = 45f,
velocity = Vector3.zero,
velocitySqrMagnitude = 0f,
- movementKind = MovementKind.IDLE,
+ movementKind = MovementKind.Idle,
isInstant = false
};
@@ -443,7 +443,7 @@ public void CompleteFlow_RemoteMovementSetsDirty_PartitionSystemClearsIt()
rotationY = 90f,
velocity = Vector3.zero,
velocitySqrMagnitude = 0f,
- movementKind = MovementKind.IDLE,
+ movementKind = MovementKind.Idle,
isInstant = false
};
diff --git a/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewController.cs b/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewController.cs
index 85ffefc06e1..350c880a19b 100644
--- a/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewController.cs
+++ b/Explorer/Assets/DCL/Character/CharacterPreview/CharacterPreviewController.cs
@@ -149,7 +149,7 @@ public bool IsAvatarLoaded() =>
public void PlayEmote(string emoteId)
{
- var intent = new CharacterEmoteIntent { EmoteId = emoteId, TriggerSource = TriggerSource.PREVIEW };
+ var intent = new CharacterEmoteIntent { EmoteId = emoteId, TriggerSource = TriggerSource.Preview };
if (globalWorld.Has(characterPreviewEntity))
globalWorld.Set(characterPreviewEntity, intent);
diff --git a/Explorer/Assets/DCL/Chat/ChatConversationsToolbarViewItem.cs b/Explorer/Assets/DCL/Chat/ChatConversationsToolbarViewItem.cs
index 6115e608788..1e8599c4d52 100644
--- a/Explorer/Assets/DCL/Chat/ChatConversationsToolbarViewItem.cs
+++ b/Explorer/Assets/DCL/Chat/ChatConversationsToolbarViewItem.cs
@@ -72,7 +72,7 @@ public class ChatConversationsToolbarViewItem : MonoBehaviour, IPointerEnterHand
private float offlineThumbnailGreyOutOpacity = 0.6f;
// This is necessary because the data is set while the script has not awakened yet
- private OnlineStatus storedConnectionStatus = OnlineStatus.OFFLINE;
+ private OnlineStatus storedConnectionStatus = OnlineStatus.Offline;
///
/// Gets or sets the identifier of the conversation.
@@ -150,10 +150,10 @@ public void ShowMentionSign(bool show)
public virtual void SetConnectionStatus(OnlineStatus connectionStatus)
{
connectionStatusIndicator.color = onlineStatusConfiguration.GetConfiguration(connectionStatus).StatusColor;
- connectionStatusIndicatorContainer.SetActive(connectionStatus == OnlineStatus.ONLINE);
+ connectionStatusIndicatorContainer.SetActive(connectionStatus == OnlineStatus.Online);
if(thumbnailView != null && thumbnailView.TryGetComponent(out ProfilePictureView profilePictureView))
- profilePictureView.GreyOut(connectionStatus != OnlineStatus.ONLINE ? offlineThumbnailGreyOutOpacity : 0.0f);
+ profilePictureView.GreyOut(connectionStatus != OnlineStatus.Online ? offlineThumbnailGreyOutOpacity : 0.0f);
storedConnectionStatus = connectionStatus;
}
diff --git a/Explorer/Assets/DCL/Chat/ChatTitlebarView.cs b/Explorer/Assets/DCL/Chat/ChatTitlebarView.cs
index 3a0230ed4b5..a05bf4d35e7 100644
--- a/Explorer/Assets/DCL/Chat/ChatTitlebarView.cs
+++ b/Explorer/Assets/DCL/Chat/ChatTitlebarView.cs
@@ -46,7 +46,7 @@ private void OnContextMenuButtonClicked()
{
var request = new ShowChannelContextMenuRequest
{
- Position = defaultTitlebarView.ButtonOpenContextMenu.transform.position, AnchorPoint = MenuAnchorPoint.TOP_LEFT
+ Position = defaultTitlebarView.ButtonOpenContextMenu.transform.position, AnchorPoint = MenuAnchorPoint.TopLeft
};
OnContextMenuRequested?.Invoke(request);
@@ -58,7 +58,7 @@ private void OnProfileContextMenuClicked(TitlebarViewMode mode)
{
var data = new UserProfileMenuRequest
{
- WalletAddress = new Web3Address(""), Position = defaultTitlebarView.ButtonOpenProfileContextMenu.transform.position, AnchorPoint = MenuAnchorPoint.TOP_LEFT, Offset = Vector2.zero,
+ WalletAddress = new Web3Address(""), Position = defaultTitlebarView.ButtonOpenProfileContextMenu.transform.position, AnchorPoint = MenuAnchorPoint.TopLeft, Offset = Vector2.zero,
OnShow = defaultTitlebarView.SetContextMenuButtonSelectedAppearance,
OnHide = defaultTitlebarView.SetContextMenuButtonNormalAppearance
};
@@ -68,7 +68,7 @@ private void OnProfileContextMenuClicked(TitlebarViewMode mode)
{
var data = new ShowContextMenuRequest
{
- Position = defaultTitlebarView.ButtonOpenProfileContextMenu.transform.position, AnchorPoint = MenuAnchorPoint.TOP_LEFT, Offset = Vector2.zero,
+ Position = defaultTitlebarView.ButtonOpenProfileContextMenu.transform.position, AnchorPoint = MenuAnchorPoint.TopLeft, Offset = Vector2.zero,
OnShow = defaultTitlebarView.SetContextMenuButtonSelectedAppearance,
OnHide = defaultTitlebarView.SetContextMenuButtonNormalAppearance
};
diff --git a/Explorer/Assets/DCL/Chat/Commands/ChatTeleporter.cs b/Explorer/Assets/DCL/Chat/Commands/ChatTeleporter.cs
index 8fb63b6006b..a3ff610771a 100644
--- a/Explorer/Assets/DCL/Chat/Commands/ChatTeleporter.cs
+++ b/Explorer/Assets/DCL/Chat/Commands/ChatTeleporter.cs
@@ -67,15 +67,15 @@ public async UniTask TeleportToRealmAsync(string realm, CancellationToke
return error.State switch
{
- ChangeRealmError.MESSAGE_ERROR => $"🔴 Teleport was not fully successful to {realm} world!",
- ChangeRealmError.NOT_REACHABLE => $"🔴 Error: The world {realm} doesn't exist or not reachable!",
- ChangeRealmError.CHANGE_CANCELLED => "🔴 Error: The operation was canceled!",
- ChangeRealmError.LOCAL_SCENE_DEVELOPMENT_BLOCKED => "🔴 Error: Realm changes are not allowed in local scene development mode",
- ChangeRealmError.UNAUTHORIZED_WORLD_ACCESS => "🔴 Error: User is not authorized to access the requested world",
- ChangeRealmError.TIMEOUT => "🔴 Error: We were unable to connect to the realm. Please verify your connection.",
- ChangeRealmError.PASSWORD_REQUIRED => $"🔴 Error: The world {realm} requires a password to access",
- ChangeRealmError.PASSWORD_CANCELLED => "🟡 Password entry was cancelled",
- ChangeRealmError.WHITELIST_ACCESS_DENIED => $"🔴 Error: You are not on the access list for {realm}",
+ ChangeRealmError.MessageError => $"🔴 Teleport was not fully successful to {realm} world!",
+ ChangeRealmError.NotReachable => $"🔴 Error: The world {realm} doesn't exist or not reachable!",
+ ChangeRealmError.ChangeCancelled => "🔴 Error: The operation was canceled!",
+ ChangeRealmError.LocalSceneDevelopmentBlocked => "🔴 Error: Realm changes are not allowed in local scene development mode",
+ ChangeRealmError.UnauthorizedWorldAccess => "🔴 Error: User is not authorized to access the requested world",
+ ChangeRealmError.Timeout => "🔴 Error: We were unable to connect to the realm. Please verify your connection.",
+ ChangeRealmError.PasswordRequired => $"🔴 Error: The world {realm} requires a password to access",
+ ChangeRealmError.PasswordCancelled => "🟡 Password entry was cancelled",
+ ChangeRealmError.WhitelistAccessDenied => $"🔴 Error: You are not on the access list for {realm}",
_ => throw new ArgumentOutOfRangeException()
};
}
@@ -102,12 +102,12 @@ public async UniTask TeleportToRealmAsync(string realm, Vector2Int targe
return error.State switch
{
- ChangeRealmError.MESSAGE_ERROR => $"🔴 Teleport was not fully successful to {realm} world!",
- ChangeRealmError.NOT_REACHABLE => $"🔴 Error: The world {realm} doesn't exist or not reachable!",
- ChangeRealmError.CHANGE_CANCELLED => "🔴 Error: The operation was canceled!",
- ChangeRealmError.LOCAL_SCENE_DEVELOPMENT_BLOCKED => "🔴 Error: Realm changes are not allowed in local scene development mode",
- ChangeRealmError.UNAUTHORIZED_WORLD_ACCESS => "🔴 Error: User is not authorized to access the requested world",
- ChangeRealmError.TIMEOUT => "🔴 Error: We were unable to connect to the realm. Please verify your connection.",
+ ChangeRealmError.MessageError => $"🔴 Teleport was not fully successful to {realm} world!",
+ ChangeRealmError.NotReachable => $"🔴 Error: The world {realm} doesn't exist or not reachable!",
+ ChangeRealmError.ChangeCancelled => "🔴 Error: The operation was canceled!",
+ ChangeRealmError.LocalSceneDevelopmentBlocked => "🔴 Error: Realm changes are not allowed in local scene development mode",
+ ChangeRealmError.UnauthorizedWorldAccess => "🔴 Error: User is not authorized to access the requested world",
+ ChangeRealmError.Timeout => "🔴 Error: We were unable to connect to the realm. Please verify your connection.",
_ => throw new ArgumentOutOfRangeException()
};
}
diff --git a/Explorer/Assets/DCL/Chat/MessageBus/ChatMessageOrigins.cs b/Explorer/Assets/DCL/Chat/MessageBus/ChatMessageOrigins.cs
index 9399c72ba5e..61a84c9f207 100644
--- a/Explorer/Assets/DCL/Chat/MessageBus/ChatMessageOrigins.cs
+++ b/Explorer/Assets/DCL/Chat/MessageBus/ChatMessageOrigins.cs
@@ -4,12 +4,12 @@ namespace DCL.Chat.MessageBus
{
public enum ChatMessageOrigin
{
- CHAT,
- DEBUG_PANEL,
- RESTRICTED_ACTION_API,
- MINIMAP,
- JUMP_IN,
- TELEPORT_PROMPT,
+ Chat,
+ DebugPanel,
+ RestrictedActionApi,
+ Minimap,
+ JumpIn,
+ TeleportPrompt,
}
public static class ChatMessageOriginExtensions
@@ -18,12 +18,12 @@ public static string ToStringValue(this ChatMessageOrigin origin)
{
return origin switch
{
- ChatMessageOrigin.CHAT => "chat",
- ChatMessageOrigin.DEBUG_PANEL => "debug panel",
- ChatMessageOrigin.RESTRICTED_ACTION_API => "RestrictedActionAPI",
- ChatMessageOrigin.MINIMAP => "minimap",
- ChatMessageOrigin.JUMP_IN => "jump in",
- ChatMessageOrigin.TELEPORT_PROMPT => "teleport prompt",
+ ChatMessageOrigin.Chat => "chat",
+ ChatMessageOrigin.DebugPanel => "debug panel",
+ ChatMessageOrigin.RestrictedActionApi => "RestrictedActionAPI",
+ ChatMessageOrigin.Minimap => "minimap",
+ ChatMessageOrigin.JumpIn => "jump in",
+ ChatMessageOrigin.TeleportPrompt => "teleport prompt",
_ => throw new ArgumentOutOfRangeException(nameof(origin), origin, null),
};
}
diff --git a/Explorer/Assets/DCL/Chat/MessageBus/IChatMessagesBus.cs b/Explorer/Assets/DCL/Chat/MessageBus/IChatMessagesBus.cs
index e397d27766a..ad42393370a 100644
--- a/Explorer/Assets/DCL/Chat/MessageBus/IChatMessagesBus.cs
+++ b/Explorer/Assets/DCL/Chat/MessageBus/IChatMessagesBus.cs
@@ -36,7 +36,7 @@ public static IChatMessagesBus WithDebugPanel(this IChatMessagesBus messagesBus,
{
void CreateTestChatEntry()
{
- messagesBus.SendWithUtcNowTimestamp(ChatChannel.NEARBY_CHANNEL, StringUtils.GenerateRandomString(Random.Range(1, 250)), ChatMessageOrigin.DEBUG_PANEL);
+ messagesBus.SendWithUtcNowTimestamp(ChatChannel.NEARBY_CHANNEL, StringUtils.GenerateRandomString(Random.Range(1, 250)), ChatMessageOrigin.DebugPanel);
}
debugContainerBuilder.TryAddWidget(IDebugContainerBuilder.Categories.CHAT)?.AddControl(new DebugButtonDef("Create chat message", CreateTestChatEntry), null!);
diff --git a/Explorer/Assets/DCL/Chat/MessageBus/LiveKitChatMessagesBus.cs b/Explorer/Assets/DCL/Chat/MessageBus/LiveKitChatMessagesBus.cs
index dc523ef62df..38fcd8d142c 100644
--- a/Explorer/Assets/DCL/Chat/MessageBus/LiveKitChatMessagesBus.cs
+++ b/Explorer/Assets/DCL/Chat/MessageBus/LiveKitChatMessagesBus.cs
@@ -57,7 +57,7 @@ public LiveKitChatMessagesBus(IMessagePipesHub messagePipesHub,
this.identityCache = identityCache;
this.messageFactory = messageFactory;
- isChatMessageRateLimiterEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.CHAT_MESSAGE_RATE_LIMIT);
+ isChatMessageRateLimiterEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.ChatMessageRateLimit);
if (isChatMessageRateLimiterEnabled)
{
@@ -65,7 +65,7 @@ public LiveKitChatMessagesBus(IMessagePipesHub messagePipesHub,
messageRateLimiter.LoadConfigurationFromFeatureFlag();
}
- isNearbyChannelBufferEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.CHAT_MESSAGE_BUFFER);
+ isNearbyChannelBufferEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.ChatMessageBuffer);
if (isNearbyChannelBufferEnabled)
{
@@ -74,7 +74,7 @@ public LiveKitChatMessagesBus(IMessagePipesHub messagePipesHub,
roomHub.IslandRoom().ConnectionUpdated += OnIslandConnectionUpdated;
}
- isPrivateChatRequiresTopicEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.PRIVATE_CHAT_REQUIRES_TOPIC);
+ isPrivateChatRequiresTopicEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.PrivateChatRequiresTopic);
identityCache.OnIdentityCleared += OnIdentityCleared;
diff --git a/Explorer/Assets/DCL/Chat/MessageBus/TeleportPromptChatBridge.cs b/Explorer/Assets/DCL/Chat/MessageBus/TeleportPromptChatBridge.cs
index 685f72ecab1..8d8246e14c5 100644
--- a/Explorer/Assets/DCL/Chat/MessageBus/TeleportPromptChatBridge.cs
+++ b/Explorer/Assets/DCL/Chat/MessageBus/TeleportPromptChatBridge.cs
@@ -27,6 +27,6 @@ public void Dispose() =>
teleportPromptBus.TeleportApproved -= OnTeleportApproved;
private void OnTeleportApproved(Vector2Int coords) =>
- chatMessagesBus.SendWithUtcNowTimestamp(ChatChannel.NEARBY_CHANNEL, $"/{ChatCommandsUtils.COMMAND_GOTO} {coords.x},{coords.y}", ChatMessageOrigin.TELEPORT_PROMPT);
+ chatMessagesBus.SendWithUtcNowTimestamp(ChatChannel.NEARBY_CHANNEL, $"/{ChatCommandsUtils.COMMAND_GOTO} {coords.x},{coords.y}", ChatMessageOrigin.TeleportPrompt);
}
}
diff --git a/Explorer/Assets/DCL/Chat/RPCChatPrivacyService.cs b/Explorer/Assets/DCL/Chat/RPCChatPrivacyService.cs
index 9803c93b15f..99aa1b3a081 100644
--- a/Explorer/Assets/DCL/Chat/RPCChatPrivacyService.cs
+++ b/Explorer/Assets/DCL/Chat/RPCChatPrivacyService.cs
@@ -54,7 +54,7 @@ public async UniTask GetOwnSocialSettingsAsync(CancellationToken ct)
.AttachExternalCancellation(ct)
.Timeout(TimeSpan.FromSeconds(TIMEOUT_SECONDS));
- settingsAsset.OnPrivacyRead(response.Ok?.Settings.PrivateMessagesPrivacy == PrivateMessagePrivacySetting.OnlyFriends ? ChatPrivacySettings.ONLY_FRIENDS : ChatPrivacySettings.ALL);
+ settingsAsset.OnPrivacyRead(response.Ok?.Settings.PrivateMessagesPrivacy == PrivateMessagePrivacySetting.OnlyFriends ? ChatPrivacySettings.OnlyFriends : ChatPrivacySettings.All);
}
public async UniTask GetPrivacySettingForUsersAsync(HashSet walletIds, CancellationToken ct)
diff --git a/Explorer/Assets/DCL/Chat/Settings/ChatSettingsAsset.cs b/Explorer/Assets/DCL/Chat/Settings/ChatSettingsAsset.cs
index b5c3a7ed165..55aefafaaf7 100644
--- a/Explorer/Assets/DCL/Chat/Settings/ChatSettingsAsset.cs
+++ b/Explorer/Assets/DCL/Chat/Settings/ChatSettingsAsset.cs
@@ -7,10 +7,10 @@ namespace DCL.Settings.Settings
//[CreateAssetMenu(fileName = "ChatSettings", menuName = "DCL/Settings/Chat Settings")]
public class ChatSettingsAsset : ScriptableObject
{
- [FormerlySerializedAs("chatSettings")] public ChatAudioSettings chatAudioSettings = ChatAudioSettings.ALL;
- public ChatPrivacySettings chatPrivacySettings = ChatPrivacySettings.ALL;
- public ChatBubbleVisibilitySettings chatBubblesVisibilitySettings = ChatBubbleVisibilitySettings.ALL;
- public ChatPreferredTranslationSettings chatPreferredTranslationSettings = ChatPreferredTranslationSettings.EN;
+ [FormerlySerializedAs("chatSettings")] public ChatAudioSettings chatAudioSettings = ChatAudioSettings.All;
+ public ChatPrivacySettings chatPrivacySettings = ChatPrivacySettings.All;
+ public ChatBubbleVisibilitySettings chatBubblesVisibilitySettings = ChatBubbleVisibilitySettings.All;
+ public ChatPreferredTranslationSettings chatPreferredTranslationSettings = ChatPreferredTranslationSettings.En;
public bool chatReactionsEnabled = true;
public string CHAT_TRANSLATION_SETTINGS_HOVER_TOOLTIP
@@ -56,35 +56,35 @@ public void SetReactionsEnabled(bool enabled)
public enum ChatAudioSettings
{
- ALL = 0,
- MENTIONS_ONLY = 1,
- NONE = 2,
+ All = 0,
+ MentionsOnly = 1,
+ None = 2,
}
public enum ChatPrivacySettings
{
- ONLY_FRIENDS = 0,
- ALL = 1,
+ OnlyFriends = 0,
+ All = 1,
}
public enum ChatBubbleVisibilitySettings
{
- NONE = 0,
- NEARBY_ONLY = 1,
- ALL
+ None = 0,
+ NearbyOnly = 1,
+ All
}
public enum ChatPreferredTranslationSettings
{
- EN = 0,
- ES = 1,
- FR = 2,
- DE = 3,
- RU = 4,
- PT = 5,
- IT = 6,
- ZH = 7,
- JA = 8,
- KO = 9
+ En = 0,
+ Es = 1,
+ Fr = 2,
+ De = 3,
+ Ru = 4,
+ Pt = 5,
+ It = 6,
+ Zh = 7,
+ Ja = 8,
+ Ko = 9
}
}
diff --git a/Explorer/Assets/DCL/Chat/SharedArea/ChatMainSharedAreaController.cs b/Explorer/Assets/DCL/Chat/SharedArea/ChatMainSharedAreaController.cs
index 215b82fe102..25483f427f6 100644
--- a/Explorer/Assets/DCL/Chat/SharedArea/ChatMainSharedAreaController.cs
+++ b/Explorer/Assets/DCL/Chat/SharedArea/ChatMainSharedAreaController.cs
@@ -34,7 +34,7 @@ public ChatMainSharedAreaController(ViewFactoryMethod viewFactory,
this.dclInput = dclInput;
}
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.PERSISTENT;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Persistent;
protected override void OnViewInstantiated()
{
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatChannels/ChatChannelsView.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatChannels/ChatChannelsView.cs
index f81ffcced52..0dba2010069 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatChannels/ChatChannelsView.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatChannels/ChatChannelsView.cs
@@ -118,7 +118,7 @@ public void AddConversation(BaseChannelViewModel viewModel)
newItem.SetOfficialIconVisibility(user.IsOfficial);
newItem.Configure(isClosable: true);
newItem.BindProfileThumbnail(user.ProfilePicture);
- newItem.SetConnectionStatus(OnlineStatus.OFFLINE);
+ newItem.SetConnectionStatus(OnlineStatus.Offline);
break;
@@ -155,7 +155,7 @@ public void UpdateConversation(BaseChannelViewModel viewModel)
itemToUpdate.SetConversationName(user.DisplayName);
itemToUpdate.SetClaimedNameIconVisibility(user.HasClaimedName);
itemToUpdate.SetOfficialIconVisibility(user.IsOfficial);
- itemToUpdate.SetConnectionStatus(user.IsOnline ? OnlineStatus.ONLINE : OnlineStatus.OFFLINE);
+ itemToUpdate.SetConnectionStatus(user.IsOnline ? OnlineStatus.Online : OnlineStatus.Offline);
break;
case CommunityChannelViewModel community:
@@ -167,7 +167,7 @@ public void UpdateConversation(BaseChannelViewModel viewModel)
public void SetOnlineStatus(string channelId, bool isOnline)
{
- if (items.TryGetValue(new ChatChannel.ChannelId(channelId), out ChatConversationsToolbarViewItem? item)) { item.SetConnectionStatus(isOnline ? OnlineStatus.ONLINE : OnlineStatus.OFFLINE); }
+ if (items.TryGetValue(new ChatChannel.ChannelId(channelId), out ChatConversationsToolbarViewItem? item)) { item.SetConnectionStatus(isOnline ? OnlineStatus.Online : OnlineStatus.Offline); }
}
public void AddItem(ChatConversationsToolbarViewItem newItem)
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/GetUserCallStatusCommand.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/GetUserCallStatusCommand.cs
index 7981650fb12..0cacfd671e6 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/GetUserCallStatusCommand.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/GetUserCallStatusCommand.cs
@@ -24,15 +24,15 @@ public GetUserCallStatusCommand(PrivateConversationUserStateService userStateSer
switch (result.Value.Result.ChatUserState)
{
- case PrivateConversationUserStateService.ChatUserState.CONNECTED:
- return CallButtonPresenter.OtherUserCallStatus.USER_AVAILABLE;
- case PrivateConversationUserStateService.ChatUserState.PRIVATE_MESSAGES_BLOCKED_BY_OWN_USER:
- return CallButtonPresenter.OtherUserCallStatus.OWN_USER_REJECTS_CALLS;
- case PrivateConversationUserStateService.ChatUserState.PRIVATE_MESSAGES_BLOCKED:
- return CallButtonPresenter.OtherUserCallStatus.USER_REJECTS_CALLS;
- case PrivateConversationUserStateService.ChatUserState.BLOCKED_BY_OWN_USER:
- case PrivateConversationUserStateService.ChatUserState.DISCONNECTED:
- default: return CallButtonPresenter.OtherUserCallStatus.USER_OFFLINE;
+ case PrivateConversationUserStateService.ChatUserState.Connected:
+ return CallButtonPresenter.OtherUserCallStatus.UserAvailable;
+ case PrivateConversationUserStateService.ChatUserState.PrivateMessagesBlockedByOwnUser:
+ return CallButtonPresenter.OtherUserCallStatus.OwnUserRejectsCalls;
+ case PrivateConversationUserStateService.ChatUserState.PrivateMessagesBlocked:
+ return CallButtonPresenter.OtherUserCallStatus.UserRejectsCalls;
+ case PrivateConversationUserStateService.ChatUserState.BlockedByOwnUser:
+ case PrivateConversationUserStateService.ChatUserState.Disconnected:
+ default: return CallButtonPresenter.OtherUserCallStatus.UserOffline;
}
}
}
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/GetUserChatStatusCommand.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/GetUserChatStatusCommand.cs
index b4389400465..71c43a4ebca 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/GetUserChatStatusCommand.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/GetUserChatStatusCommand.cs
@@ -27,7 +27,7 @@ public GetUserChatStatusCommand(PrivateConversationUserStateService userStateSer
if (ct.IsCancellationRequested || !result.Success)
{
eventBus.RaiseUserStatusUpdatedEvent(new ChatChannel.ChannelId(userId), ChatChannel.ChatChannelType.USER, userId, false);
- return new PrivateConversationUserStateService.UserState(false, PrivateConversationUserStateService.ChatUserState.DISCONNECTED);
+ return new PrivateConversationUserStateService.UserState(false, PrivateConversationUserStateService.ChatUserState.Disconnected);
}
bool isOnline = result.Value.Result.IsConsideredOnline;
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/ResolveInputStateCommand.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/ResolveInputStateCommand.cs
index d3ca89f1196..796464a17ca 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/ResolveInputStateCommand.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/ResolveInputStateCommand.cs
@@ -28,7 +28,7 @@ public ResolveInputStateCommand(GetUserChatStatusCommand getUserChatStatusComman
{
case ChatChannel.ChatChannelType.NEARBY:
case ChatChannel.ChatChannelType.COMMUNITY:
- return currentChannelService.InputState = Result.SuccessResult(PrivateConversationUserStateService.ChatUserState.CONNECTED);
+ return currentChannelService.InputState = Result.SuccessResult(PrivateConversationUserStateService.ChatUserState.Connected);
case ChatChannel.ChatChannelType.USER:
{
var status = await getUserChatStatusCommand.ExecuteAsync(currentChannel.Id.Id, ct);
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/SendMessageCommand.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/SendMessageCommand.cs
index c8ac491fac4..d40c6e64c94 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/SendMessageCommand.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatCommands/SendMessageCommand.cs
@@ -37,13 +37,13 @@ public void Execute(SendMessageCommandPayload commandPayload)
//TODO: This logic needs to discriminate which notifications to play depending on the type of message (if private or not)
//depending on user's settings for notifications.
- if (chatSettings.chatAudioSettings == ChatAudioSettings.ALL)
+ if (chatSettings.chatAudioSettings == ChatAudioSettings.All)
UIAudioEventsBus.Instance.SendPlayAudioEvent(sound);
chatMessageBus.SendWithUtcNowTimestamp(
currentChannelService.CurrentChannel,
commandPayload.Body,
- ChatMessageOrigin.CHAT);
+ ChatMessageOrigin.Chat);
}
}
}
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/ChatInputPresenter.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/ChatInputPresenter.cs
index 44799a4e707..45d538968be 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/ChatInputPresenter.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/ChatInputPresenter.cs
@@ -135,7 +135,7 @@ private async UniTaskVoid UpdateStateForChannelAsync()
private void OnBlockedUpdated(Result result)
{
- fsm.CurrentState!.OnBlockedUpdated(result is { Success: true, Value: PrivateConversationUserStateService.ChatUserState.CONNECTED });
+ fsm.CurrentState!.OnBlockedUpdated(result is { Success: true, Value: PrivateConversationUserStateService.ChatUserState.Connected });
}
public void Dispose()
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/States/BlockedChatInputState.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/States/BlockedChatInputState.cs
index 3ce1e97b44a..a3519acaf2c 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/States/BlockedChatInputState.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/States/BlockedChatInputState.cs
@@ -39,15 +39,15 @@ private void UpdateBlockedReason()
if (currentChannelService.InputState.Success)
{
- Assert.IsTrue(currentChannelService.InputState.Value != PrivateConversationUserStateService.ChatUserState.CONNECTED);
+ Assert.IsTrue(currentChannelService.InputState.Value != PrivateConversationUserStateService.ChatUserState.Connected);
blockedReason = currentChannelService.InputState.Value switch
{
- PrivateConversationUserStateService.ChatUserState.BLOCKED_BY_OWN_USER => config.BlockedByOwnUserMessage,
- PrivateConversationUserStateService.ChatUserState.DISCONNECTED => config.UserOfflineMessage,
- PrivateConversationUserStateService.ChatUserState.PRIVATE_MESSAGES_BLOCKED_BY_OWN_USER => config.OnlyFriendsOwnUserMessage,
- PrivateConversationUserStateService.ChatUserState.PRIVATE_MESSAGES_BLOCKED => config.OnlyFriendsMessage,
- PrivateConversationUserStateService.ChatUserState.OTHER_CLIENT => config.ConnectedFromAnotherClientMessage,
+ PrivateConversationUserStateService.ChatUserState.BlockedByOwnUser => config.BlockedByOwnUserMessage,
+ PrivateConversationUserStateService.ChatUserState.Disconnected => config.UserOfflineMessage,
+ PrivateConversationUserStateService.ChatUserState.PrivateMessagesBlockedByOwnUser => config.OnlyFriendsOwnUserMessage,
+ PrivateConversationUserStateService.ChatUserState.PrivateMessagesBlocked => config.OnlyFriendsMessage,
+ PrivateConversationUserStateService.ChatUserState.OtherClient => config.ConnectedFromAnotherClientMessage,
_ => string.Empty
};
}
@@ -55,7 +55,7 @@ private void UpdateBlockedReason()
blockedReason = currentChannelService.InputState.ErrorMessage!;
view.maskButton.onClick.RemoveListener(BlockedInputClicked);
- if (currentChannelService.InputState is { Success: true, Value: PrivateConversationUserStateService.ChatUserState.PRIVATE_MESSAGES_BLOCKED_BY_OWN_USER })
+ if (currentChannelService.InputState is { Success: true, Value: PrivateConversationUserStateService.ChatUserState.PrivateMessagesBlockedByOwnUser })
view.maskButton.onClick.AddListener(BlockedInputClicked);
view.SetBlocked(blockedReason);
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/States/SuggestionPanelChatInputState.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/States/SuggestionPanelChatInputState.cs
index 1637693573e..ed29278b676 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/States/SuggestionPanelChatInputState.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatInput/States/SuggestionPanelChatInputState.cs
@@ -75,14 +75,14 @@ internal async UniTask TryFindMatchAsync(string inputText, CancellationTok
if (wordMatch.Success)
{
wordMatchIndex = wordMatch.Index;
- lastMatch = await suggestionPanelController.HandleSuggestionsSearchAsync(wordMatch.Value, EMOJI_PATTERN_REGEX, InputSuggestionType.EMOJIS, emojiSuggestionsDictionary, ct);
+ lastMatch = await suggestionPanelController.HandleSuggestionsSearchAsync(wordMatch.Value, EMOJI_PATTERN_REGEX, InputSuggestionType.Emojis, emojiSuggestionsDictionary, ct);
if (lastMatch.Success) return true;
//If we don't find any emoji pattern only then we look for username patterns
UpdateProfileNameMap();
- lastMatch = await suggestionPanelController.HandleSuggestionsSearchAsync(wordMatch.Value, PROFILE_PATTERN_REGEX, InputSuggestionType.PROFILE, profileSuggestionsDictionary, ct);
+ lastMatch = await suggestionPanelController.HandleSuggestionsSearchAsync(wordMatch.Value, PROFILE_PATTERN_REGEX, InputSuggestionType.Profile, profileSuggestionsDictionary, ct);
if (lastMatch.Success) return true;
}
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatMessages/ChatMessageFeedPresenter.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatMessages/ChatMessageFeedPresenter.cs
index 132353a4cb0..e2618077e9b 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatMessages/ChatMessageFeedPresenter.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatMessages/ChatMessageFeedPresenter.cs
@@ -324,7 +324,7 @@ private void OnProfileContextMenuRequested(string userId, Vector2 position)
{
var request = new UserProfileMenuRequest
{
- WalletAddress = new Web3Address(userId), Position = position, AnchorPoint = MenuAnchorPoint.TOP_RIGHT, Offset = Vector2.zero,
+ WalletAddress = new Web3Address(userId), Position = position, AnchorPoint = MenuAnchorPoint.TopRight, Offset = Vector2.zero,
};
contextMenuService.ShowUserProfileMenuAsync(request).Forget();
@@ -340,7 +340,7 @@ private void OnChatContextMenuRequested(string messageId, ChatEntryView? chatEnt
chatConfig.ContextMenuOffset,
chatConfig.VerticalPadding,
chatConfig.ElementsSpacing,
- anchorPoint: ContextMenuOpenDirection.TOP_LEFT);
+ anchorPoint: ContextMenuOpenDirection.TopLeft);
string textToCopy = viewModel.IsTranslated ? viewModel.TranslatedText : viewModel.Message.Message;
contextMenu.AddControl(new ButtonContextMenuControlSettings(
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatPanelPresenter.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatPanelPresenter.cs
index 54a3bf87695..9f65ba94597 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatPanelPresenter.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatPanelPresenter.cs
@@ -323,7 +323,7 @@ private void OnMVCViewOpened(ChatSharedAreaEvents.MVCViewOpenEvent evt)
//We only need to hide the chat if a fullscreen view is shown
switch (evt.ViewSortingLayer)
{
- case CanvasOrdering.SortingLayer.FULLSCREEN:
+ case CanvasOrdering.SortingLayer.Fullscreen:
chatStateMachine.SetVisibility(false);
break;
}
@@ -331,7 +331,7 @@ private void OnMVCViewOpened(ChatSharedAreaEvents.MVCViewOpenEvent evt)
private void OnMVCViewClosed(ChatSharedAreaEvents.MVCViewClosedEvent evt)
{
- if (evt.ViewSortingLayer is not CanvasOrdering.SortingLayer.FULLSCREEN) return;
+ if (evt.ViewSortingLayer is not CanvasOrdering.SortingLayer.Fullscreen) return;
if (!chatStateMachine.IsFocused)
chatStateMachine.PopState();
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatReactions/Core/ChatReactionsFactory.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatReactions/Core/ChatReactionsFactory.cs
index 18ee839c283..783aa2b1faf 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatReactions/Core/ChatReactionsFactory.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatReactions/Core/ChatReactionsFactory.cs
@@ -93,10 +93,10 @@ public static Result Create(
remoteTarget, worldReactor, situationalReactionFacade,
streamEmitter);
- simulationLoop.WorldReactionsEnabled = chatSettingsAsset.chatBubblesVisibilitySettings != ChatBubbleVisibilitySettings.NONE;
+ simulationLoop.WorldReactionsEnabled = chatSettingsAsset.chatBubblesVisibilitySettings != ChatBubbleVisibilitySettings.None;
simulationLoop.UIReactionsEnabled = chatSettingsAsset.chatReactionsEnabled;
- ChatSettingsAsset.ChatBubblesVisibilityDelegate bubblesHandler = visibility => simulationLoop.WorldReactionsEnabled = visibility != ChatBubbleVisibilitySettings.NONE;
+ ChatSettingsAsset.ChatBubblesVisibilityDelegate bubblesHandler = visibility => simulationLoop.WorldReactionsEnabled = visibility != ChatBubbleVisibilitySettings.None;
chatSettingsAsset.BubblesVisibilityChanged += bubblesHandler;
ChatSettingsAsset.ChatReactionsEnabledDelegate reactionsHandler = enabled => simulationLoop.UIReactionsEnabled = enabled;
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatReactions/Presenters/EmojiPanelReactionBridge.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatReactions/Presenters/EmojiPanelReactionBridge.cs
index e2af737ca51..721d1ec120a 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatReactions/Presenters/EmojiPanelReactionBridge.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatReactions/Presenters/EmojiPanelReactionBridge.cs
@@ -71,7 +71,7 @@ public void Hide()
if (playerMovementBlocked)
{
- inputBlock.Enable(InputMapComponent.Kind.PLAYER);
+ inputBlock.Enable(InputMapComponent.Kind.Player);
playerMovementBlocked = false;
}
}
@@ -107,7 +107,7 @@ private void Open()
if (!playerMovementBlocked)
{
- inputBlock.Disable(InputMapComponent.Kind.PLAYER);
+ inputBlock.Disable(InputMapComponent.Kind.Player);
playerMovementBlocked = true;
}
}
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/ChatHistoryService.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/ChatHistoryService.cs
index 1464a97a035..27c0d82df1e 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/ChatHistoryService.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/ChatHistoryService.cs
@@ -81,10 +81,10 @@ private void HandleMessageAudioFeedback(ChatMessage message, ChatChannel.Channel
switch (settings)
{
- case ChatAudioSettings.NONE:
+ case ChatAudioSettings.None:
return;
- case ChatAudioSettings.MENTIONS_ONLY when message.IsMention:
- case ChatAudioSettings.ALL:
+ case ChatAudioSettings.MentionsOnly when message.IsMention:
+ case ChatAudioSettings.All:
PlayMessageAudio(message, channelId);
break;
}
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/ChatWorldBubbleService.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/ChatWorldBubbleService.cs
index a16b61eb980..5c3fdaf58d0 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/ChatWorldBubbleService.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/ChatWorldBubbleService.cs
@@ -67,8 +67,8 @@ private void OnChatMessageAdded(ChatChannel destinationChannel, ChatMessage adde
public void CreateChatBubble(ChatChannel channel, ChatMessage chatMessage, bool isSentByOwnUser, string? communityName = null)
{
if (!nametagsData.showNameTags
- || chatSettings.chatBubblesVisibilitySettings == ChatBubbleVisibilitySettings.NONE
- || (channel.ChannelType != ChatChannel.ChatChannelType.NEARBY && chatSettings.chatBubblesVisibilitySettings == ChatBubbleVisibilitySettings.NEARBY_ONLY))
+ || chatSettings.chatBubblesVisibilitySettings == ChatBubbleVisibilitySettings.None
+ || (channel.ChannelType != ChatChannel.ChatChannelType.NEARBY && chatSettings.chatBubblesVisibilitySettings == ChatBubbleVisibilitySettings.NearbyOnly))
return;
if (chatMessage.IsSentByOwnUser == false && entityParticipantTable.TryGet(chatMessage.SenderWalletAddress, out var entry))
@@ -98,7 +98,7 @@ public void CreateChatBubble(ChatChannel channel, ChatMessage chatMessage, bool
break;
case ChatChannel.ChatChannelType.USER:
// Chat bubbles appear if the channel is nearby or if settings allow them to appear for private conversations
- if (chatSettings.chatBubblesVisibilitySettings == ChatBubbleVisibilitySettings.ALL)
+ if (chatSettings.chatBubblesVisibilitySettings == ChatBubbleVisibilitySettings.All)
{
if (!profileCache.TryGet(channel.Id.Id, out var profile))
{
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/UserStateService/PrivateConversationUserStateService.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/UserStateService/PrivateConversationUserStateService.cs
index fe02c4ad5a5..5506f08a1ca 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/UserStateService/PrivateConversationUserStateService.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatServices/UserStateService/PrivateConversationUserStateService.cs
@@ -31,12 +31,12 @@ public class PrivateConversationUserStateService : IDisposable, ICurrentChannelU
{
public enum ChatUserState
{
- CONNECTED, //Online friends and other users that are not blocked if both users have ALL set in privacy setting.
- BLOCKED_BY_OWN_USER, //Own user blocked the other user
- PRIVATE_MESSAGES_BLOCKED_BY_OWN_USER, //Own user has privacy settings set to ONLY FRIENDS
- PRIVATE_MESSAGES_BLOCKED, //The other user has its privacy settings set to ONLY FRIENDS
- DISCONNECTED, //The other user is either offline or has blocked the own user.
- OTHER_CLIENT, //The other user is connected with a client that doesn't support DMs
+ Connected, //Online friends and other users that are not blocked if both users have ALL set in privacy setting.
+ BlockedByOwnUser, //Own user blocked the other user
+ PrivateMessagesBlockedByOwnUser, //Own user has privacy settings set to ONLY FRIENDS
+ PrivateMessagesBlocked, //The other user has its privacy settings set to ONLY FRIENDS
+ Disconnected, //The other user is either offline or has blocked the own user.
+ OtherClient, //The other user is connected with a client that doesn't support DMs
}
public readonly struct UserState
@@ -163,7 +163,7 @@ private void UnsubscribeFromEvents()
private void OnPrivacySettingsSet(ChatPrivacySettings privacySettings)
{
- rpcChatPrivacyService.UpsertSocialSettingsAsync(privacySettings == ChatPrivacySettings.ALL, cts.Token).Forget();
+ rpcChatPrivacyService.UpsertSocialSettingsAsync(privacySettings == ChatPrivacySettings.All, cts.Token).Forget();
// Simply notify that the ChatUserState should be updated
// It will be retrieved via "GetChatUserStateAsync"
@@ -179,29 +179,29 @@ public async UniTask GetChatUserStateAsync(string userId, Cancellatio
bool isUserConnected = UserIsConsideredAsOnline(userId);
//If it's a friend we just return its connection status
- if (friendshipStatus == FriendshipStatus.FRIEND)
- return new UserState(isUserConnected, isUserConnected ? ChatUserState.CONNECTED : ChatUserState.DISCONNECTED);
+ if (friendshipStatus == FriendshipStatus.Friend)
+ return new UserState(isUserConnected, isUserConnected ? ChatUserState.Connected : ChatUserState.Disconnected);
//If the user is blocked by us, we show that first
- if (friendshipStatus == FriendshipStatus.BLOCKED)
- return new UserState(isUserConnected, ChatUserState.BLOCKED_BY_OWN_USER);
+ if (friendshipStatus == FriendshipStatus.Blocked)
+ return new UserState(isUserConnected, ChatUserState.BlockedByOwnUser);
// If we are being blocked by them, show them as offline
- if (friendshipStatus == FriendshipStatus.BLOCKED_BY)
- return new UserState(false, ChatUserState.DISCONNECTED);
+ if (friendshipStatus == FriendshipStatus.BlockedBy)
+ return new UserState(false, ChatUserState.Disconnected);
// This is done because other clients don't connect to chat livekit room, so they are not found in the participant list.
// If we are able to find them through either island or scene room, it means we cannot chat with them
if (!isUserConnected && (roomHub.TryGetUser(userId, out _, out _) || roomHub.TryGetUser(lowerUserId, out _, out _)))
- return new UserState(isUserConnected, ChatUserState.OTHER_CLIENT);
+ return new UserState(isUserConnected, ChatUserState.OtherClient);
// If the user is not reachable by any means, they are simply offline
if (!isUserConnected)
- return new UserState(false, ChatUserState.DISCONNECTED);
+ return new UserState(false, ChatUserState.Disconnected);
//If the user is connected we need to check our settings and then theirs.
- if (settingsAsset.chatPrivacySettings == ChatPrivacySettings.ONLY_FRIENDS)
- return new UserState(isUserConnected, ChatUserState.PRIVATE_MESSAGES_BLOCKED_BY_OWN_USER);
+ if (settingsAsset.chatPrivacySettings == ChatPrivacySettings.OnlyFriends)
+ return new UserState(isUserConnected, ChatUserState.PrivateMessagesBlockedByOwnUser);
// User should be online, but check if they disconnected while processing this data + ensure we have metadata
LKParticipant? participant = chatRoom.Participants.RemoteParticipant(userId)
@@ -213,10 +213,10 @@ public async UniTask GetChatUserStateAsync(string userId, Cancellatio
ParticipantPrivacyMetadata userMetadata = JsonUtility.FromJson(participant.Metadata);
if (userMetadata.private_messages_privacy != PRIVACY_SETTING_ALL)
- return new UserState(isUserConnected, ChatUserState.PRIVATE_MESSAGES_BLOCKED);
+ return new UserState(isUserConnected, ChatUserState.PrivateMessagesBlocked);
}
- return new UserState(isUserConnected, isUserConnected ? ChatUserState.CONNECTED : ChatUserState.DISCONNECTED);
+ return new UserState(isUserConnected, isUserConnected ? ChatUserState.Connected : ChatUserState.Disconnected);
}
private void OnRoomConnectionStateChanged(IRoom room, ConnectionUpdate connectionUpdate, LKDisconnectReason? disconnectReason)
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatTitleBar/ChatTitlebarPresenter.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatTitleBar/ChatTitlebarPresenter.cs
index 25c98ccb5b6..0b3bcf06464 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatTitleBar/ChatTitlebarPresenter.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatTitleBar/ChatTitlebarPresenter.cs
@@ -111,7 +111,7 @@ public ChatTitlebarPresenter(
contextMenuSettings.Offset,
contextMenuSettings.VerticalLayoutPadding,
contextMenuSettings.ElementsSpacing,
- ContextMenuOpenDirection.TOP_LEFT)
+ ContextMenuOpenDirection.TopLeft)
.AddControl(new ButtonContextMenuControlSettings(contextMenuSettings.ViewCommunityText,
contextMenuSettings.ViewCommunitySprite,
OpenCommunityCard));
@@ -455,23 +455,23 @@ private void InitializeChannelContextMenu()
verticalLayoutPadding: chatConfig.chatContextMenuSettings.VerticalPadding,
elementsSpacing: chatConfig.chatContextMenuSettings.ElementsSpacing,
offsetFromTarget: chatConfig.chatContextMenuSettings.NotificationPingSubMenuOffsetFromTarget,
- anchorPoint: ContextMenuOpenDirection.TOP_LEFT)
- .AddControl(notificationPingToggles[(int)ChatAudioSettings.ALL] =
+ anchorPoint: ContextMenuOpenDirection.TopLeft)
+ .AddControl(notificationPingToggles[(int)ChatAudioSettings.All] =
new ToggleWithCheckContextMenuControlSettings("All Messages",
- x => OnNotificationPingOptionSelected(ChatAudioSettings.ALL), toggleGroup))
- .AddControl(notificationPingToggles[(int)ChatAudioSettings.MENTIONS_ONLY] =
+ x => OnNotificationPingOptionSelected(ChatAudioSettings.All), toggleGroup))
+ .AddControl(notificationPingToggles[(int)ChatAudioSettings.MentionsOnly] =
new ToggleWithCheckContextMenuControlSettings("Mentions Only",
- x => OnNotificationPingOptionSelected(ChatAudioSettings.MENTIONS_ONLY), toggleGroup))
- .AddControl(notificationPingToggles[(int)ChatAudioSettings.NONE] =
+ x => OnNotificationPingOptionSelected(ChatAudioSettings.MentionsOnly), toggleGroup))
+ .AddControl(notificationPingToggles[(int)ChatAudioSettings.None] =
new ToggleWithCheckContextMenuControlSettings("None",
- x => OnNotificationPingOptionSelected(ChatAudioSettings.NONE), toggleGroup)));
+ x => OnNotificationPingOptionSelected(ChatAudioSettings.None), toggleGroup)));
contextMenuInstance = new GenericContextMenu(
chatConfig.chatContextMenuSettings.ContextMenuWidth,
chatConfig.chatContextMenuSettings.OffsetFromTarget,
chatConfig.chatContextMenuSettings.VerticalPadding,
chatConfig.chatContextMenuSettings.ElementsSpacing,
- anchorPoint: ContextMenuOpenDirection.TOP_LEFT)
+ anchorPoint: ContextMenuOpenDirection.TopLeft)
.AddControl(subMenuSettings);
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatViews/ChannelMemberFeedView.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatViews/ChannelMemberFeedView.cs
index 6078caf89dc..ee737013a2b 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatViews/ChannelMemberFeedView.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatViews/ChannelMemberFeedView.cs
@@ -79,7 +79,7 @@ private void HandleItemContextMenuRequest(MemberEntryContextMenuRequest request)
{
var data = new UserProfileMenuRequest
{
- WalletAddress = new Web3Address(request.UserId), Position = request.Position, AnchorPoint = MenuAnchorPoint.TOP_RIGHT, Offset = Vector2.zero,
+ WalletAddress = new Web3Address(request.UserId), Position = request.Position, AnchorPoint = MenuAnchorPoint.TopRight, Offset = Vector2.zero,
OnHide = request.OnHide
};
diff --git a/Explorer/Assets/DCL/Chat/_Refactor/ChatViews/ChatDefaultTitlebarView.cs b/Explorer/Assets/DCL/Chat/_Refactor/ChatViews/ChatDefaultTitlebarView.cs
index c4c789d8d65..e9e884a59c4 100644
--- a/Explorer/Assets/DCL/Chat/_Refactor/ChatViews/ChatDefaultTitlebarView.cs
+++ b/Explorer/Assets/DCL/Chat/_Refactor/ChatViews/ChatDefaultTitlebarView.cs
@@ -90,8 +90,8 @@ public void Setup(ChatTitlebarViewModel model)
buttonOpenMembers.gameObject.SetActive(shouldShowMembersButton);
bool isUnresolvedPlaceholder = string.IsNullOrEmpty(model.Id)
- && model.Thumbnail.Value.ThumbnailState is ProfileThumbnailViewModel.State.LOADING
- or ProfileThumbnailViewModel.State.NOT_BOUND;
+ && model.Thumbnail.Value.ThumbnailState is ProfileThumbnailViewModel.State.Loading
+ or ProfileThumbnailViewModel.State.NotBound;
if (isUnresolvedPlaceholder)
{
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserController.cs b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserController.cs
index 0829c36ca68..8191e618f76 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserController.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserController.cs
@@ -84,8 +84,8 @@ public class CommunitiesBrowserController : ISection, IDisposable
private bool isSectionActivated;
private string currentSearchText = string.Empty;
- private CommunitiesRightSideSections currentSection = CommunitiesRightSideSections.MAIN_SECTION;
- private bool isInvitesAndRequestsSectionActive => currentSection == CommunitiesRightSideSections.INVITES_AND_REQUESTS_SECTION;
+ private CommunitiesRightSideSections currentSection = CommunitiesRightSideSections.MainSection;
+ private bool isInvitesAndRequestsSectionActive => currentSection == CommunitiesRightSideSections.InvitesAndRequestsSection;
public CommunitiesBrowserController(
CommunitiesBrowserView view,
@@ -263,7 +263,7 @@ public RectTransform GetRectTransform() =>
private void ViewAllMyCommunitiesResults()
{
ClearSearchBar();
- SetActiveSection(CommunitiesRightSideSections.MAIN_SECTION);
+ SetActiveSection(CommunitiesRightSideSections.MainSection);
mainRightSectionPresenter.ViewAllMyCommunitiesResults();
}
@@ -281,7 +281,7 @@ private void LoadMyCommunities()
private void LoadJoinRequestsAndAllCommunities()
{
- SetActiveSection(CommunitiesRightSideSections.MAIN_SECTION);
+ SetActiveSection(CommunitiesRightSideSections.MainSection);
loadResultsCts = loadResultsCts.SafeRestart();
mainRightSectionPresenter.SetAsLoading();
@@ -298,7 +298,7 @@ async UniTaskVoid LoadJoinRequestsAndAllCommunitiesAsync(CancellationToken ct)
private void LoadInvitesAndRequestsResults()
{
ClearSearchBar();
- SetActiveSection(CommunitiesRightSideSections.INVITES_AND_REQUESTS_SECTION);
+ SetActiveSection(CommunitiesRightSideSections.InvitesAndRequestsSection);
loadResultsCts = loadResultsCts.SafeRestart();
LoadInvitesAndRequestsAsync(loadResultsCts.Token).Forget();
return;
@@ -466,10 +466,10 @@ async UniTaskVoid RefreshInvitesCounterAsync(CancellationToken ct)
}
private void DisableShortcutsInput(string text) =>
- inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Disable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
private void RestoreInput(string text) =>
- inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Enable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
private void SearchBarValueChanged(string searchText)
{
@@ -492,7 +492,7 @@ private async UniTaskVoid AwaitAndSendSearchAsync(string searchText, Cancellatio
if (currentSearchText == searchText)
return;
- SetActiveSection(CommunitiesRightSideSections.MAIN_SECTION);
+ SetActiveSection(CommunitiesRightSideSections.MainSection);
if (string.IsNullOrEmpty(searchText))
mainRightSectionPresenter.LoadAllCommunities();
@@ -508,12 +508,12 @@ private void SetActiveSection(CommunitiesRightSideSections activeSection)
switch (activeSection)
{
- case CommunitiesRightSideSections.MAIN_SECTION:
+ case CommunitiesRightSideSections.MainSection:
view.SetResultsSectionActive(true);
view.InvitesAndRequestsView.SetSectionActive(false);
manageRequestReceivedCts?.SafeCancelAndDispose();
break;
- case CommunitiesRightSideSections.INVITES_AND_REQUESTS_SECTION:
+ case CommunitiesRightSideSections.InvitesAndRequestsSection:
view.SetResultsSectionActive(false);
view.InvitesAndRequestsView.SetSectionActive(true);
break;
@@ -898,7 +898,7 @@ private async void OnBlockUserAsync(ICommunityMemberData profile)
try
{
await mvcManager.ShowAsync(BlockUserPromptController.IssueCommand(
- new BlockUserPromptParams(new Web3Address(profile.Address), profile.Name, BlockUserPromptParams.UserBlockAction.BLOCK)), CancellationToken.None);
+ new BlockUserPromptParams(new Web3Address(profile.Address), profile.Name, BlockUserPromptParams.UserBlockAction.Block)), CancellationToken.None);
}
catch (OperationCanceledException) { }
catch (Exception ex)
@@ -954,13 +954,13 @@ private async UniTaskVoid CheckCommunityAppArgAsync(CancellationToken ct = defau
public enum CommunitiesRightSideSections
{
- MAIN_SECTION,
- INVITES_AND_REQUESTS_SECTION,
+ MainSection,
+ InvitesAndRequestsSection,
}
public enum CommunitiesViews
{
- BROWSE_ALL_COMMUNITIES,
- FILTERED_COMMUNITIES,
+ BrowseAllCommunities,
+ FilteredCommunities,
}
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserFilteredCommunitiesPresenter.cs b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserFilteredCommunitiesPresenter.cs
index 9d5c81c4b31..6f995b9a9c4 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserFilteredCommunitiesPresenter.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserFilteredCommunitiesPresenter.cs
@@ -119,7 +119,7 @@ private void OnBackButtonClicked()
public void LoadAllMyCommunities()
{
view.SetResultsTitleText(MY_COMMUNITIES_RESULTS_TITLE);
- view.SetActiveViewSection(FilteredCommunitiesView.ActiveViewSection.MY_COMMUNITIES);
+ view.SetActiveViewSection(FilteredCommunitiesView.ActiveViewSection.MyCommunities);
loadResultsCts = loadResultsCts.SafeRestart();
@@ -135,7 +135,7 @@ public void LoadAllMyCommunities()
public void LoadAllStreamingCommunities()
{
view.SetResultsTitleText(STREAMING_COMMUNITIES_RESULTS_TITLE);
- view.SetActiveViewSection(FilteredCommunitiesView.ActiveViewSection.STREAMING);
+ view.SetActiveViewSection(FilteredCommunitiesView.ActiveViewSection.Streaming);
loadResultsCts = loadResultsCts.SafeRestart();
@@ -152,7 +152,7 @@ public void LoadAllStreamingCommunities()
public async UniTask LoadAllCommunitiesAsync(CancellationToken ct)
{
view.SetResultsTitleText(BROWSE_COMMUNITIES_TITLE);
- view.SetActiveViewSection(FilteredCommunitiesView.ActiveViewSection.ALL_COMMUNITIES);
+ view.SetActiveViewSection(FilteredCommunitiesView.ActiveViewSection.AllCommunities);
loadResultsCts = loadResultsCts.SafeRestartLinked(ct);
await LoadResultsAsync(
@@ -256,7 +256,7 @@ private async UniTask LoadResultsAsync(
public void LoadSearchResults(string searchText)
{
- view.SetActiveViewSection(FilteredCommunitiesView.ActiveViewSection.SEARCH_COMMUNITIES);
+ view.SetActiveViewSection(FilteredCommunitiesView.ActiveViewSection.SearchCommunities);
view.SetResultsBackButtonVisible(true);
view.SetResultsTitleText(string.Format(SEARCH_RESULTS_TITLE_FORMAT, searchText));
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserMainRightSectionPresenter.cs b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserMainRightSectionPresenter.cs
index d746c401c61..e30888d8823 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserMainRightSectionPresenter.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserMainRightSectionPresenter.cs
@@ -53,7 +53,7 @@ public void Dispose()
private void OnViewAllStreamingCommunities()
{
browserEventBus.RaiseClearSearchBarEvent();
- view.SetActiveView(CommunitiesViews.FILTERED_COMMUNITIES);
+ view.SetActiveView(CommunitiesViews.FilteredCommunities);
filteredCommunitiesPresenter.LoadAllStreamingCommunities();
}
@@ -64,7 +64,7 @@ private void TryLoadMoreResults()
public void LoadSearchResults(string searchText)
{
- view.SetActiveView(CommunitiesViews.FILTERED_COMMUNITIES);
+ view.SetActiveView(CommunitiesViews.FilteredCommunities);
filteredCommunitiesPresenter.LoadSearchResults(searchText);
}
@@ -78,7 +78,7 @@ public void Deactivate()
public void LoadAllCommunities()
{
browserEventBus.RaiseClearSearchBarEvent();
- view.SetActiveView(CommunitiesViews.BROWSE_ALL_COMMUNITIES);
+ view.SetActiveView(CommunitiesViews.BrowseAllCommunities);
LoadAllCommunitiesAsync().Forget();
}
@@ -86,7 +86,7 @@ public void LoadAllCommunities()
public void SetAsLoading()
{
browserEventBus.RaiseClearSearchBarEvent();
- view.SetActiveView(CommunitiesViews.BROWSE_ALL_COMMUNITIES);
+ view.SetActiveView(CommunitiesViews.BrowseAllCommunities);
loadCts = loadCts.SafeRestart();
streamingCommunitiesPresenter.SetAsLoading(true);
filteredCommunitiesPresenter.SetAsLoading(true);
@@ -109,7 +109,7 @@ await UniTask.WhenAll(
public void ViewAllMyCommunitiesResults()
{
- view.SetActiveView(CommunitiesViews.FILTERED_COMMUNITIES);
+ view.SetActiveView(CommunitiesViews.FilteredCommunities);
filteredCommunitiesPresenter.LoadAllMyCommunities();
}
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserRightSectionMainView.cs b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserRightSectionMainView.cs
index c1737956754..64c7b7f9533 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserRightSectionMainView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserRightSectionMainView.cs
@@ -39,11 +39,11 @@ public void SetActiveView(CommunitiesViews activeView)
{
switch (activeView)
{
- case CommunitiesViews.FILTERED_COMMUNITIES:
+ case CommunitiesViews.FilteredCommunities:
streamingCommunitiesView.HideStreamingSection();
filteredCommunitiesView.SetResultsBackButtonVisible(true);
break;
- case CommunitiesViews.BROWSE_ALL_COMMUNITIES:
+ case CommunitiesViews.BrowseAllCommunities:
filteredCommunitiesView.SetResultsBackButtonVisible(false);
break;
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserStreamingCommunitiesPresenter.cs b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserStreamingCommunitiesPresenter.cs
index daef0148517..6067d65f42f 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserStreamingCommunitiesPresenter.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunitiesBrowserStreamingCommunitiesPresenter.cs
@@ -36,7 +36,7 @@ public CommunitiesBrowserStreamingCommunitiesPresenter(
this.browserStateService = browserStateService;
this.commandsLibrary = commandsLibrary;
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
{
view.InitializeStreamingResultsGrid(0);
@@ -48,7 +48,7 @@ public CommunitiesBrowserStreamingCommunitiesPresenter(
public void Dispose()
{
- if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
return;
view.JoinStream -= JoinStreamClicked;
@@ -72,7 +72,7 @@ public async UniTask LoadStreamingCommunitiesAsync(CancellationToken ct)
{
view.HideStreamingSection();
- if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
return;
view.HideStreamingSection();
@@ -107,7 +107,7 @@ public async UniTask LoadStreamingCommunitiesAsync(CancellationToken ct)
public void SetAsLoading(bool isLoading)
{
- if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
return;
view.SetAsLoading(isLoading);
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunityRequestsReceivedGroupView.cs b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunityRequestsReceivedGroupView.cs
index 1b9cb1c0d3e..52d4dbe8831 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunityRequestsReceivedGroupView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunityRequestsReceivedGroupView.cs
@@ -74,7 +74,7 @@ private void Awake()
.AddControl(new SeparatorContextMenuControlSettings(contextMenuSettings.SeparatorHeight, -contextMenuSettings.VerticalPadding.left, -contextMenuSettings.VerticalPadding.right))
.AddControl(blockUserContextMenuElement = new GenericContextMenuElement(new ButtonContextMenuControlSettings(contextMenuSettings.BlockText, contextMenuSettings.BlockSprite, () => BlockUserRequested?.Invoke(lastClickedProfileCtx), iconColor: redColor, textColor: redColor)));
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.REPORT_USER))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.ReportUser))
contextMenu.AddControl(new ButtonContextMenuControlSettings(contextMenuSettings.ReportText, contextMenuSettings.ReportOptionSprite, () => ReportUserRequested?.Invoke(lastClickedProfileCtx), iconColor: redColor, textColor: redColor));
}
@@ -133,7 +133,7 @@ private void CreateAndSetupRequestReceivedMembers(ICommunityMemberData memberPro
MemberListItemView requestReceivedMemberView = requestsReceivedMembersPool!.Get();
// Setup card data
- requestReceivedMemberView.Configure(memberProfile, MembersListView.MemberListSections.REQUESTS, false, profileRepositoryWrapper!);
+ requestReceivedMemberView.Configure(memberProfile, MembersListView.MemberListSections.Requests, false, profileRepositoryWrapper!);
// Setup card events
requestReceivedMemberView.SubscribeToInteractions(member => OpenProfilePassportRequested?.Invoke(member),
@@ -150,7 +150,7 @@ private void OnContextMenuButtonClicked(ICommunityMemberData profile, Vector2 bu
lastClickedProfileCtx = profile;
contextMenuCts = contextMenuCts.SafeRestart();
UserProfileContextMenuControlSettings.FriendshipStatus status = profile.FriendshipStatus.Convert();
- userProfileContextMenuControlSettings!.SetInitialData(profile.Profile, status == UserProfileContextMenuControlSettings.FriendshipStatus.FRIEND ? status : UserProfileContextMenuControlSettings.FriendshipStatus.DISABLED);
+ userProfileContextMenuControlSettings!.SetInitialData(profile.Profile, status == UserProfileContextMenuControlSettings.FriendshipStatus.Friend ? status : UserProfileContextMenuControlSettings.FriendshipStatus.Disabled);
elementView.CanUnHover = false;
blockUserContextMenuElement!.Enabled = profile.FriendshipStatus != FriendshipStatus.blocked && profile.FriendshipStatus != FriendshipStatus.blocked_by;
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunityResultCardView.cs b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunityResultCardView.cs
index 4e83bf920bd..e230f4eafd7 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunityResultCardView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/CommunityResultCardView.cs
@@ -112,7 +112,7 @@ async UniTask ShowDeleteInvitationConfirmationDialogAsync(CancellationToken ct)
Result dialogResult = await ViewDependencies.ConfirmationDialogOpener.OpenConfirmationDialogAsync(new ConfirmationDialogParameter(string.Format(DELETE_COMMUNITY_INVITATION_TEXT_FORMAT, currentCommunityName), DELETE_COMMUNITY_INVITATION_CANCEL_TEXT, DELETE_COMMUNITY_INVITATION_CONFIRM_TEXT, communityThumbnail.ImageSprite, true, false), ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL)
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel)
return;
RejectCommunityInvitationButtonClicked?.Invoke(CommunityId, currentInviteOrRequestId, this);
@@ -189,7 +189,7 @@ public void SetPrivacy(CommunityPrivacy privacy)
public void SetMembersCount(int memberCount)
{
- bool isMembersCounterEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITIES_MEMBERS_COUNTER);
+ bool isMembersCounterEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunitiesMembersCounter);
communityMembersSeparator.SetActive(isMembersCounterEnabled);
communityMembersCountText.gameObject.SetActive(isMembersCounterEnabled);
@@ -203,41 +203,41 @@ public void SetInviteOrRequestId(string id) =>
public void SetActionButtonsState(CommunityPrivacy privacy, InviteRequestAction type, bool isMember, bool isStreaming = false, bool hasJoined = false)
{
if (isStreaming)
- SetActionButtonsState(hasJoined ? ActionButtonsState.STREAMING_GOTO : ActionButtonsState.STREAMING_JOIN);
+ SetActionButtonsState(hasJoined ? ActionButtonsState.StreamingGoto : ActionButtonsState.StreamingJoin);
else if ((privacy == CommunityPrivacy.@public || isMember) && type == InviteRequestAction.none)
- SetActionButtonsState(isMember ? ActionButtonsState.PUBLIC_VIEW : ActionButtonsState.PUBLIC_JOIN);
+ SetActionButtonsState(isMember ? ActionButtonsState.PublicView : ActionButtonsState.PublicJoin);
else if (privacy == CommunityPrivacy.@private && !isMember && type != InviteRequestAction.invite)
- SetActionButtonsState(type == InviteRequestAction.request_to_join ? ActionButtonsState.PRIVATE_CANCEL_JOIN : ActionButtonsState.PRIVATE_REQUEST_JOIN);
+ SetActionButtonsState(type == InviteRequestAction.request_to_join ? ActionButtonsState.PrivateCancelJoin : ActionButtonsState.PrivateRequestJoin);
else if (type == InviteRequestAction.invite)
- SetActionButtonsState(ActionButtonsState.PRIVATE_WITH_INVITE);
+ SetActionButtonsState(ActionButtonsState.PrivateWithInvite);
}
private void SetActionButtonsState(ActionButtonsState buttonsState)
{
switch (buttonsState)
{
- case ActionButtonsState.PUBLIC_JOIN:
- case ActionButtonsState.PUBLIC_VIEW:
+ case ActionButtonsState.PublicJoin:
+ case ActionButtonsState.PublicView:
SetPublicState(buttonsState, isActiveState: true);
SetStreamingState(buttonsState, isActiveState: false);
SetPrivateJoinRequestState(buttonsState, isActiveState: false);
SetPrivateInvitationState(isActiveState: false);
break;
- case ActionButtonsState.STREAMING_JOIN:
- case ActionButtonsState.STREAMING_GOTO:
+ case ActionButtonsState.StreamingJoin:
+ case ActionButtonsState.StreamingGoto:
SetPublicState(buttonsState, isActiveState: false);
SetStreamingState(buttonsState, isActiveState: true);
SetPrivateJoinRequestState(buttonsState, isActiveState: false);
SetPrivateInvitationState(isActiveState: false);
break;
- case ActionButtonsState.PRIVATE_REQUEST_JOIN:
- case ActionButtonsState.PRIVATE_CANCEL_JOIN:
+ case ActionButtonsState.PrivateRequestJoin:
+ case ActionButtonsState.PrivateCancelJoin:
SetPublicState(buttonsState, isActiveState: false);
SetStreamingState(buttonsState, isActiveState: false);
SetPrivateJoinRequestState(buttonsState, isActiveState: true);
SetPrivateInvitationState(isActiveState: false);
break;
- case ActionButtonsState.PRIVATE_WITH_INVITE:
+ case ActionButtonsState.PrivateWithInvite:
SetPublicState(buttonsState, isActiveState: false);
SetStreamingState(buttonsState, isActiveState: false);
SetPrivateJoinRequestState(buttonsState, isActiveState: false);
@@ -250,16 +250,16 @@ private void SetPublicState(ActionButtonsState buttonsState, bool isActiveState)
{
joinOrViewButtonsContainer.SetActive(isActiveState);
if (!isActiveState) return;
- joinCommunityButton.gameObject.SetActive(buttonsState is ActionButtonsState.PUBLIC_JOIN);
- viewCommunityButton.gameObject.SetActive(buttonsState is ActionButtonsState.PUBLIC_VIEW);
+ joinCommunityButton.gameObject.SetActive(buttonsState is ActionButtonsState.PublicJoin);
+ viewCommunityButton.gameObject.SetActive(buttonsState is ActionButtonsState.PublicView);
}
private void SetPrivateJoinRequestState(ActionButtonsState buttonsState, bool isActiveState)
{
requestOrCancelToJoinButtonsContainer.SetActive(isActiveState);
if (!isActiveState) return;
- requestToJoinButton.gameObject.SetActive(buttonsState is ActionButtonsState.PRIVATE_REQUEST_JOIN);
- cancelJoinRequestButton.gameObject.SetActive(buttonsState is ActionButtonsState.PRIVATE_CANCEL_JOIN);
+ requestToJoinButton.gameObject.SetActive(buttonsState is ActionButtonsState.PrivateRequestJoin);
+ cancelJoinRequestButton.gameObject.SetActive(buttonsState is ActionButtonsState.PrivateCancelJoin);
}
private void SetPrivateInvitationState(bool isActiveState)
@@ -274,8 +274,8 @@ private void SetStreamingState(ActionButtonsState buttonsState, bool isActiveSta
{
joinStreamButtonContainer.SetActive(isActiveState);
if (!isActiveState) return;
- goToStreamButton.gameObject.SetActive(buttonsState is ActionButtonsState.STREAMING_GOTO);
- joinStreamButton.gameObject.SetActive(buttonsState is ActionButtonsState.STREAMING_JOIN);
+ goToStreamButton.gameObject.SetActive(buttonsState is ActionButtonsState.StreamingGoto);
+ joinStreamButton.gameObject.SetActive(buttonsState is ActionButtonsState.StreamingJoin);
}
@@ -418,14 +418,14 @@ public struct MutualThumbnail
private enum ActionButtonsState
{
- PUBLIC_JOIN,
- PUBLIC_VIEW,
- STREAMING_JOIN,
- STREAMING_GOTO,
- PRIVATE_REQUEST_JOIN,
- PRIVATE_CANCEL_JOIN,
- PRIVATE_WITH_INVITE,
- DEFAULT,
+ PublicJoin,
+ PublicView,
+ StreamingJoin,
+ StreamingGoto,
+ PrivateRequestJoin,
+ PrivateCancelJoin,
+ PrivateWithInvite,
+ Default,
}
}
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/FilteredCommunitiesView.cs b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/FilteredCommunitiesView.cs
index 0473eea603c..0574f028b0e 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesBrowser/FilteredCommunitiesView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesBrowser/FilteredCommunitiesView.cs
@@ -177,7 +177,7 @@ private LoopGridViewItem SetupCommunityResultCardByIndex(LoopGridView loopGridVi
var isStreaming = false;
var hasJoined = false;
- if (activeViewSection == ActiveViewSection.STREAMING)
+ if (activeViewSection == ActiveViewSection.Streaming)
{
isStreaming = true;
hasJoined = browserStateService.CurrentCommunityId.Value == communityData.id;
@@ -251,10 +251,10 @@ private void OnCommunityJoined(string communityId, CommunityResultCardView cardV
public enum ActiveViewSection
{
- STREAMING,
- ALL_COMMUNITIES,
- SEARCH_COMMUNITIES,
- MY_COMMUNITIES
+ Streaming,
+ AllCommunities,
+ SearchCommunities,
+ MyCommunities
}
}
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementCardView.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementCardView.cs
index 27dea85f947..3e143e78771 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementCardView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementCardView.cs
@@ -146,7 +146,7 @@ async UniTask ShowDeleteConfirmationDialogAsync(CancellationToken ct)
deleteSprite, false, false), ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL)
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel)
return;
DeleteAnnouncementButtonClicked?.Invoke(currentAnnouncementId);
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementEmojiController.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementEmojiController.cs
index be4e3d3e9d6..40c2be7ce99 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementEmojiController.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementEmojiController.cs
@@ -116,7 +116,7 @@ async UniTaskVoid SearchSuggestionsAndShowPanelAsync(CancellationToken ct)
// Fixes https://github.com/decentraland/unity-explorer/issues/6965
// This operation needs to be awaited otherwise a race condition occurs
// between the suggested elements generated and the submitted element processed once the panel is activated
- lastMatch = await suggestionPanelController.HandleSuggestionsSearchAsync(wordMatch.Value, EMOJI_PATTERN_REGEX, InputSuggestionType.EMOJIS, emojiSuggestionsDictionary, ct);
+ lastMatch = await suggestionPanelController.HandleSuggestionsSearchAsync(wordMatch.Value, EMOJI_PATTERN_REGEX, InputSuggestionType.Emojis, emojiSuggestionsDictionary, ct);
}
suggestionPanelController.SetPanelVisibility(lastMatch.Success);
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementsSectionController.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementsSectionController.cs
index fd0517aa693..87a0671679b 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementsSectionController.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/Announcements/AnnouncementsSectionController.cs
@@ -168,7 +168,7 @@ private async UniTaskVoid InitializeViewAsync(
return;
}
- Profile? profile = await profileRepo.GetAsync(identity.Identity!.Address, ct, IProfileRepository.FetchBehaviour.DELAY_UNTIL_RESOLVED);
+ Profile? profile = await profileRepo.GetAsync(identity.Identity!.Address, ct, IProfileRepository.FetchBehaviour.DelayUntilResolved);
view.SetProfile(profile, profileRepositoryWrapper);
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardController.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardController.cs
index 061d0a30514..8817dc66d95 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardController.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardController.cs
@@ -64,7 +64,7 @@ public class CommunityCardController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private readonly IMVCManager mvcManager;
private readonly ICameraReelStorageService cameraReelStorageService;
@@ -406,7 +406,7 @@ protected override void OnViewInstantiated()
realmNavigator,
decentralandUrlsSource);
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITIES_ANNOUNCEMENTS))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunitiesAnnouncements))
announcementsSectionController = new AnnouncementsSectionController(
viewInstance.AnnouncementsSectionView,
communitiesDataProvider,
@@ -443,7 +443,7 @@ async UniTaskVoid LoadCommunityDataAsync(CancellationToken ct)
viewInstance!.SetLoadingState(true);
//Since it's the tab that is automatically selected when the community card is opened, we set it to loading.
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITIES_ANNOUNCEMENTS))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunitiesAnnouncements))
viewInstance.AnnouncementsSectionView.SetLoadingStateActive(true);
else
viewInstance.MembersListView.SetLoadingStateActive(true);
@@ -580,17 +580,17 @@ private void OnSectionChanged(CommunityCardView.Sections section)
sectionCancellationTokenSource = sectionCancellationTokenSource.SafeRestart();
switch (section)
{
- case CommunityCardView.Sections.PHOTOS:
+ case CommunityCardView.Sections.Photos:
viewInstance!.CameraReelGalleryConfigs.PhotosView.SetAdminEmptyTextActive(communityData.role is CommunityMemberRole.moderator or CommunityMemberRole.owner);
cameraReelGalleryController!.ShowPlacesGalleryAsync(communityPlaceIds, sectionCancellationTokenSource.Token).Forget();
break;
- case CommunityCardView.Sections.MEMBERS:
+ case CommunityCardView.Sections.Members:
membersListController!.ShowMembersList(communityData, sectionCancellationTokenSource.Token);
break;
- case CommunityCardView.Sections.PLACES:
+ case CommunityCardView.Sections.Places:
placesSectionController!.ShowPlaces(communityData, communityPlaceIds, sectionCancellationTokenSource.Token);
break;
- case CommunityCardView.Sections.ANNOUNCEMENTS:
+ case CommunityCardView.Sections.Announcements:
announcementsSectionController!.ShowAnnouncements(communityData, sectionCancellationTokenSource.Token);
break;
}
@@ -802,10 +802,10 @@ private void OnCopyCommunityLinkRequested()
}
private void DisableShortcutsInput() =>
- inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Disable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
private void RestoreInput() =>
- inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Enable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) =>
UniTask.WhenAny(viewInstance!.GetClosingTasks(closeIntentCompletionSource.Task, ct));
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardView.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardView.cs
index 265d9437420..6b7bcd85b44 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardView.cs
@@ -42,10 +42,10 @@ public class CommunityCardView : ViewBase, IView
public enum Sections
{
- PHOTOS,
- MEMBERS,
- PLACES,
- ANNOUNCEMENTS,
+ Photos,
+ Members,
+ Places,
+ Announcements,
}
[Serializable]
@@ -170,30 +170,30 @@ async UniTask ShowDeleteInvitationConfirmationDialogAsync(CancellationToken ct)
false, false), ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL) return;
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel) return;
RejectInvite?.Invoke();
}
});
- photosButton.onClick.AddListener(() => ToggleSection(Sections.PHOTOS));
- membersButton.onClick.AddListener(() => ToggleSection(Sections.MEMBERS));
- membersTextButton.onClick.AddListener(() => ToggleSection(Sections.MEMBERS));
- placesButton.onClick.AddListener(() => ToggleSection(Sections.PLACES));
- placesWithSignButton.onClick.AddListener(() => ToggleSection(Sections.PLACES));
+ photosButton.onClick.AddListener(() => ToggleSection(Sections.Photos));
+ membersButton.onClick.AddListener(() => ToggleSection(Sections.Members));
+ membersTextButton.onClick.AddListener(() => ToggleSection(Sections.Members));
+ placesButton.onClick.AddListener(() => ToggleSection(Sections.Places));
+ placesWithSignButton.onClick.AddListener(() => ToggleSection(Sections.Places));
placesShortcutButton.onClick.AddListener(() => OpenWizardRequested?.Invoke());
- isAnnouncementsFeatureEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITIES_ANNOUNCEMENTS);
+ isAnnouncementsFeatureEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunitiesAnnouncements);
announcementsButton.gameObject.SetActive(isAnnouncementsFeatureEnabled);
if (isAnnouncementsFeatureEnabled)
- announcementsButton.onClick.AddListener(() => ToggleSection(Sections.ANNOUNCEMENTS));
+ announcementsButton.onClick.AddListener(() => ToggleSection(Sections.Announcements));
contextMenu = new GenericContextMenu(contextMenuSettings.ContextMenuWidth,
offsetFromTarget: contextMenuSettings.OffsetFromTarget,
verticalLayoutPadding: contextMenuSettings.VerticalPadding,
elementsSpacing: contextMenuSettings.ElementsSpacing,
- anchorPoint: ContextMenuOpenDirection.BOTTOM_LEFT)
+ anchorPoint: ContextMenuOpenDirection.BottomLeft)
.AddControl(communityNotificationsContextMenuElement = new GenericContextMenuElement(
communityNotificationsContextMenuControlSettings = new ToggleWithIconContextMenuControlSettings(contextMenuSettings.CommunityNotificationsSprite, contextMenuSettings.CommunityNotificationsText, OnToggleCommunityNotifications, null, 10)))
.AddControl(communityNotificationsSeparatorContextMenuElement = new GenericContextMenuElement(
@@ -232,7 +232,7 @@ async UniTask ShowDeleteConfirmationDialogAsync(CancellationToken ct)
true, false), ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL) return;
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel) return;
DeleteCommunityRequested?.Invoke();
}
@@ -272,7 +272,7 @@ async UniTask ShowLeaveConfirmationDialogAsync(CancellationToken ct)
ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL) return;
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel) return;
LeaveCommunityRequested?.Invoke();
}
@@ -299,7 +299,7 @@ public void SetCardBackgroundColor(Color color, int shaderProperty)
public void ResetToggle(bool invokeEvent)
{
currentSection = null;
- ToggleSection(isAnnouncementsFeatureEnabled ? Sections.ANNOUNCEMENTS : Sections.MEMBERS, invokeEvent);
+ ToggleSection(isAnnouncementsFeatureEnabled ? Sections.Announcements : Sections.Members, invokeEvent);
}
public void ClearCurrentSection()
@@ -331,16 +331,16 @@ private void ToggleSection(Sections section, bool invokeEvent = true)
currentSection = section;
- photosSectionSelection.SetActive(section == Sections.PHOTOS);
- membersSectionSelection.SetActive(section == Sections.MEMBERS);
- placesSectionSelection.SetActive(section == Sections.PLACES);
- placesWithSignSectionSelection.SetActive(section == Sections.PLACES);
- announcementsSelection.SetActive(section == Sections.ANNOUNCEMENTS);
+ photosSectionSelection.SetActive(section == Sections.Photos);
+ membersSectionSelection.SetActive(section == Sections.Members);
+ placesSectionSelection.SetActive(section == Sections.Places);
+ placesWithSignSectionSelection.SetActive(section == Sections.Places);
+ announcementsSelection.SetActive(section == Sections.Announcements);
- CameraReelGalleryConfigs.PhotosView.SetActive(section == Sections.PHOTOS);
- MembersListView.SetActive(section == Sections.MEMBERS);
- PlacesSectionView.SetActive(section == Sections.PLACES);
- AnnouncementsSectionView.SetActive(section == Sections.ANNOUNCEMENTS);
+ CameraReelGalleryConfigs.PhotosView.SetActive(section == Sections.Photos);
+ MembersListView.SetActive(section == Sections.Members);
+ PlacesSectionView.SetActive(section == Sections.Places);
+ AnnouncementsSectionView.SetActive(section == Sections.Announcements);
if (invokeEvent)
SectionChanged?.Invoke(section);
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardVoiceChatPresenter.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardVoiceChatPresenter.cs
index 139c942a501..08c05671083 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardVoiceChatPresenter.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/CommunityCardVoiceChatPresenter.cs
@@ -23,7 +23,7 @@ public CommunityCardVoiceChatPresenter(CommunityCardVoiceChatView view, IVoiceCh
currentCommunityId = string.Empty;
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
{
view.StartStreamButton.onClick.AddListener(StartStream);
view.JoinStreamButton.onClick.AddListener(JoinStream);
@@ -60,13 +60,13 @@ private void StartStream()
{
UIAudioEventsBus.Instance.SendPlayAudioEvent(view.StartStreamAudio);
ClosePanel?.Invoke();
- voiceChatOrchestrator.StartCall(currentCommunityId, VoiceChatType.COMMUNITY);
+ voiceChatOrchestrator.StartCall(currentCommunityId, VoiceChatType.Community);
SetPanelStatus(true, true, currentCommunityId);
}
public void Reset()
{
- if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
return;
view.VoiceChatPanel.SetActive(false);
@@ -74,7 +74,7 @@ public void Reset()
public void SetPanelStatus(bool isStreamRunning, bool isModOrAdmin, string communityId)
{
- if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
return;
currentCommunityId = communityId;
@@ -88,7 +88,7 @@ public void SetPanelStatus(bool isStreamRunning, bool isModOrAdmin, string commu
public void SetListenersCount(int listenersCount)
{
- if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
return;
stringBuilder.Clear();
@@ -101,7 +101,7 @@ public void SetListenersCount(int listenersCount)
public void Dispose()
{
- if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.COMMUNITY_VOICE_CHAT))
+ if (!FeaturesRegistry.Instance.IsEnabled(FeatureId.CommunityVoiceChat))
return;
voiceChatOrchestrator.CurrentCommunityId.OnUpdate -= UpdateJoinLeaveButtonState;
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/FriendshipHelpers.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/FriendshipHelpers.cs
index 209ce9058e9..64b7b07926f 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/FriendshipHelpers.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/FriendshipHelpers.cs
@@ -10,12 +10,12 @@ public static UserProfileContextMenuControlSettings.FriendshipStatus Convert(thi
{
return status switch
{
- FriendshipStatus.friend => UserProfileContextMenuControlSettings.FriendshipStatus.FRIEND,
- FriendshipStatus.request_received => UserProfileContextMenuControlSettings.FriendshipStatus.REQUEST_RECEIVED,
- FriendshipStatus.request_sent => UserProfileContextMenuControlSettings.FriendshipStatus.REQUEST_SENT,
- FriendshipStatus.blocked => UserProfileContextMenuControlSettings.FriendshipStatus.BLOCKED,
- FriendshipStatus.blocked_by => UserProfileContextMenuControlSettings.FriendshipStatus.DISABLED,
- FriendshipStatus.none => UserProfileContextMenuControlSettings.FriendshipStatus.NONE,
+ FriendshipStatus.friend => UserProfileContextMenuControlSettings.FriendshipStatus.Friend,
+ FriendshipStatus.request_received => UserProfileContextMenuControlSettings.FriendshipStatus.RequestReceived,
+ FriendshipStatus.request_sent => UserProfileContextMenuControlSettings.FriendshipStatus.RequestSent,
+ FriendshipStatus.blocked => UserProfileContextMenuControlSettings.FriendshipStatus.Blocked,
+ FriendshipStatus.blocked_by => UserProfileContextMenuControlSettings.FriendshipStatus.Disabled,
+ FriendshipStatus.none => UserProfileContextMenuControlSettings.FriendshipStatus.None,
_ => throw new ArgumentOutOfRangeException(nameof(status), status, null)
};
}
@@ -24,12 +24,12 @@ public static FriendshipStatus Convert(this Friends.FriendshipStatus status)
{
return status switch
{
- Friends.FriendshipStatus.FRIEND => FriendshipStatus.friend,
- Friends.FriendshipStatus.REQUEST_RECEIVED => FriendshipStatus.request_received,
- Friends.FriendshipStatus.REQUEST_SENT => FriendshipStatus.request_sent,
- Friends.FriendshipStatus.BLOCKED => FriendshipStatus.blocked,
- Friends.FriendshipStatus.BLOCKED_BY => FriendshipStatus.blocked_by,
- Friends.FriendshipStatus.NONE => FriendshipStatus.none,
+ Friends.FriendshipStatus.Friend => FriendshipStatus.friend,
+ Friends.FriendshipStatus.RequestReceived => FriendshipStatus.request_received,
+ Friends.FriendshipStatus.RequestSent => FriendshipStatus.request_sent,
+ Friends.FriendshipStatus.Blocked => FriendshipStatus.blocked,
+ Friends.FriendshipStatus.BlockedBy => FriendshipStatus.blocked_by,
+ Friends.FriendshipStatus.None => FriendshipStatus.none,
_ => throw new ArgumentOutOfRangeException(nameof(status), status, null)
};
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MemberListItemView.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MemberListItemView.cs
index 6173a8be2c7..f6ee20c848f 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MemberListItemView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MemberListItemView.cs
@@ -44,7 +44,7 @@ public class MemberListItemView : MonoBehaviour, IPointerEnterHandler, IPointerE
private bool canUnHover = true;
private bool isUserCard = false;
- private MembersListView.MemberListSections currentSection = MembersListView.MemberListSections.MEMBERS;
+ private MembersListView.MemberListSections currentSection = MembersListView.MemberListSections.Members;
public ICommunityMemberData? UserProfile { get; protected set; }
@@ -117,20 +117,20 @@ public void Configure(ICommunityMemberData memberProfile, MembersListView.Member
currentSection = section;
isUserCard = isSelfCard;
- addFriendButton.gameObject.SetActive(!isSelfCard && memberProfile.FriendshipStatus == FriendshipStatus.none && currentSection == MembersListView.MemberListSections.MEMBERS);
- acceptFriendButton.gameObject.SetActive(!isSelfCard && memberProfile.FriendshipStatus == FriendshipStatus.request_received && currentSection == MembersListView.MemberListSections.MEMBERS);
+ addFriendButton.gameObject.SetActive(!isSelfCard && memberProfile.FriendshipStatus == FriendshipStatus.none && currentSection == MembersListView.MemberListSections.Members);
+ acceptFriendButton.gameObject.SetActive(!isSelfCard && memberProfile.FriendshipStatus == FriendshipStatus.request_received && currentSection == MembersListView.MemberListSections.Members);
// Disable this button as part of the UI/UX decision to reduce the entry clutter, highlighting only non-friends. The old condition was:
// !isSelfCard && memberProfile.friendshipStatus == FriendshipStatus.friend && currentSection == MembersListView.MemberListSections.ALL
removeFriendButton.gameObject.SetActive(false);
- cancelFriendButton.gameObject.SetActive(!isSelfCard && memberProfile.FriendshipStatus == FriendshipStatus.request_sent && currentSection == MembersListView.MemberListSections.MEMBERS);
- unblockFriendButton.gameObject.SetActive(!isSelfCard && memberProfile.FriendshipStatus == FriendshipStatus.blocked && currentSection == MembersListView.MemberListSections.MEMBERS);
+ cancelFriendButton.gameObject.SetActive(!isSelfCard && memberProfile.FriendshipStatus == FriendshipStatus.request_sent && currentSection == MembersListView.MemberListSections.Members);
+ unblockFriendButton.gameObject.SetActive(!isSelfCard && memberProfile.FriendshipStatus == FriendshipStatus.blocked && currentSection == MembersListView.MemberListSections.Members);
- deleteRequestButton.gameObject.SetActive(currentSection == MembersListView.MemberListSections.REQUESTS);
- acceptRequestButton.gameObject.SetActive(currentSection == MembersListView.MemberListSections.REQUESTS);
- cancelInviteButton.gameObject.SetActive(currentSection == MembersListView.MemberListSections.INVITES);
- unbanButton.gameObject.SetActive(currentSection == MembersListView.MemberListSections.BANNED);
+ deleteRequestButton.gameObject.SetActive(currentSection == MembersListView.MemberListSections.Requests);
+ acceptRequestButton.gameObject.SetActive(currentSection == MembersListView.MemberListSections.Requests);
+ cancelInviteButton.gameObject.SetActive(currentSection == MembersListView.MemberListSections.Invites);
+ unbanButton.gameObject.SetActive(currentSection == MembersListView.MemberListSections.Banned);
}
public void SubscribeToInteractions(Action mainButton,
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MembersListController.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MembersListController.cs
index 8318b68889e..d016f161763 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MembersListController.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MembersListController.cs
@@ -78,7 +78,7 @@ private int RequestsAmount
private CancellationTokenSource communityOperationCts = new ();
private CancellationTokenSource? reportConfirmationDialogCts;
private UniTaskCompletionSource? panelLifecycleTask;
- private MembersListView.MemberListSections currentSection = MembersListView.MemberListSections.MEMBERS;
+ private MembersListView.MemberListSections currentSection = MembersListView.MemberListSections.Members;
public MembersListController(MembersListView view,
ProfileRepositoryWrapper profileDataProvider,
@@ -188,7 +188,7 @@ async UniTaskVoid ManageRequestAsync(CancellationToken ct)
if (intention == InviteRequestIntention.accepted)
{
profile.Role = CommunityMemberRole.member;
- List memberList = sectionsFetchData[MembersListView.MemberListSections.MEMBERS].Items;
+ List memberList = sectionsFetchData[MembersListView.MemberListSections.Members].Items;
memberList.Add(profile);
}
@@ -234,7 +234,7 @@ private async void BlockUserClickedAsync(ICommunityMemberData profile)
try
{
await mvcManager.ShowAsync(BlockUserPromptController.IssueCommand(
- new BlockUserPromptParams(new Web3Address(profile.Address), profile.Name, BlockUserPromptParams.UserBlockAction.BLOCK)),
+ new BlockUserPromptParams(new Web3Address(profile.Address), profile.Name, BlockUserPromptParams.UserBlockAction.Block)),
cancellationToken);
await FetchFriendshipStatusAndRefreshAsync(profile.Address, cancellationToken);
@@ -278,9 +278,9 @@ async UniTaskVoid BanUserAsync(CancellationToken token)
return;
}
- sectionsFetchData[MembersListView.MemberListSections.MEMBERS].Items.Remove(profile);
+ sectionsFetchData[MembersListView.MemberListSections.Members].Items.Remove(profile);
- List memberList = sectionsFetchData[MembersListView.MemberListSections.BANNED].Items;
+ List memberList = sectionsFetchData[MembersListView.MemberListSections.Banned].Items;
profile.Role = CommunityMemberRole.none;
memberList.Add(profile);
@@ -332,14 +332,14 @@ async UniTaskVoid KickUserAsync(CancellationToken token)
return;
}
- sectionsFetchData[MembersListView.MemberListSections.MEMBERS].Items.Remove(profile);
+ sectionsFetchData[MembersListView.MemberListSections.Members].Items.Remove(profile);
RefreshGrid(true);
}
}
public void TryRemoveLocalUser()
{
- List memberList = sectionsFetchData[MembersListView.MemberListSections.MEMBERS].Items;
+ List memberList = sectionsFetchData[MembersListView.MemberListSections.Members].Items;
string? userAddress = web3IdentityCache.Identity?.Address;
@@ -348,7 +348,7 @@ public void TryRemoveLocalUser()
{
memberList.RemoveAt(i);
- if (currentSection == MembersListView.MemberListSections.MEMBERS)
+ if (currentSection == MembersListView.MemberListSections.Members)
RefreshGrid(true);
break;
@@ -375,7 +375,7 @@ async UniTaskVoid AddModeratorAsync(CancellationToken token)
return;
}
- List memberList = sectionsFetchData[MembersListView.MemberListSections.MEMBERS].Items;
+ List memberList = sectionsFetchData[MembersListView.MemberListSections.Members].Items;
foreach (ICommunityMemberData member in memberList)
if (member.Address.Equals(profile.Address))
@@ -408,7 +408,7 @@ async UniTaskVoid RemoveModeratorAsync(CancellationToken token)
return;
}
- List memberList = sectionsFetchData[MembersListView.MemberListSections.MEMBERS].Items;
+ List memberList = sectionsFetchData[MembersListView.MemberListSections.Members].Items;
foreach (ICommunityMemberData member in memberList)
if (member.Address.Equals(profile.Address))
@@ -444,7 +444,7 @@ private void OpenProfilePassport(ICommunityMemberData profile) =>
public override void Reset()
{
communityData = null;
- currentSection = MembersListView.MemberListSections.MEMBERS;
+ currentSection = MembersListView.MemberListSections.Members;
view.Close();
foreach (var sectionFetchData in sectionsFetchData)
@@ -466,32 +466,32 @@ private async void HandleContextMenuUserProfileButtonAsync(Profile.CompactInfo u
switch (friendshipStatus)
{
- case UserProfileContextMenuControlSettings.FriendshipStatus.REQUEST_SENT:
+ case UserProfileContextMenuControlSettings.FriendshipStatus.RequestSent:
await friendsService!.CancelFriendshipAsync(userData.UserId, ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
break;
- case UserProfileContextMenuControlSettings.FriendshipStatus.REQUEST_RECEIVED:
+ case UserProfileContextMenuControlSettings.FriendshipStatus.RequestReceived:
await mvcManager.ShowAsync(FriendRequestController.IssueCommand(new FriendRequestParams
{
OneShotFriendAccepted = userData,
}), ct: ct);
break;
- case UserProfileContextMenuControlSettings.FriendshipStatus.BLOCKED:
+ case UserProfileContextMenuControlSettings.FriendshipStatus.Blocked:
await mvcManager.ShowAsync(BlockUserPromptController.IssueCommand(new BlockUserPromptParams(
- new Web3Address(userData.UserId), userData.Name, BlockUserPromptParams.UserBlockAction.UNBLOCK)),
+ new Web3Address(userData.UserId), userData.Name, BlockUserPromptParams.UserBlockAction.Unblock)),
ct);
break;
- case UserProfileContextMenuControlSettings.FriendshipStatus.FRIEND:
+ case UserProfileContextMenuControlSettings.FriendshipStatus.Friend:
await mvcManager.ShowAsync(UnfriendConfirmationPopupController.IssueCommand(new UnfriendConfirmationPopupController.Params
{
UserId = new Web3Address(userData.UserId),
}), ct);
break;
- case UserProfileContextMenuControlSettings.FriendshipStatus.NONE:
+ case UserProfileContextMenuControlSettings.FriendshipStatus.None:
await mvcManager.ShowAsync(FriendRequestController.IssueCommand(new FriendRequestParams
{
DestinationUser = new Web3Address(userData.UserId),
@@ -525,11 +525,11 @@ protected override async UniTask FetchDataAsync(CancellationToken ct)
UniTask responseTask = currentSection switch
{
- MembersListView.MemberListSections.MEMBERS => communitiesDataProvider.GetCommunityMembersAsync(communityData?.id, membersData.PageNumber, PAGE_SIZE, ct),
- MembersListView.MemberListSections.BANNED => communitiesDataProvider.GetBannedCommunityMembersAsync(communityData?.id, membersData.PageNumber, PAGE_SIZE, ct),
- MembersListView.MemberListSections.REQUESTS =>
+ MembersListView.MemberListSections.Members => communitiesDataProvider.GetCommunityMembersAsync(communityData?.id, membersData.PageNumber, PAGE_SIZE, ct),
+ MembersListView.MemberListSections.Banned => communitiesDataProvider.GetBannedCommunityMembersAsync(communityData?.id, membersData.PageNumber, PAGE_SIZE, ct),
+ MembersListView.MemberListSections.Requests =>
communitiesDataProvider.GetCommunityInviteRequestAsync(communityData?.id, InviteRequestAction.request_to_join, membersData.PageNumber, PAGE_SIZE, ct),
- MembersListView.MemberListSections.INVITES =>
+ MembersListView.MemberListSections.Invites =>
communitiesDataProvider.GetCommunityInviteRequestAsync(communityData?.id, InviteRequestAction.invite, membersData.PageNumber, PAGE_SIZE, ct),
_ => throw new ArgumentOutOfRangeException(nameof(currentSection), currentSection, null)
};
@@ -549,7 +549,7 @@ protected override async UniTask FetchDataAsync(CancellationToken ct)
if (!membersData.Items.Contains(member))
membersData.Items.Add(member);
- if (currentSection == MembersListView.MemberListSections.REQUESTS)
+ if (currentSection == MembersListView.MemberListSections.Requests)
RequestsAmount = response.Value.total;
return response.Value.total;
@@ -628,7 +628,7 @@ async UniTaskVoid UnbanUserAsync(CancellationToken ct)
return;
}
- sectionsFetchData[MembersListView.MemberListSections.BANNED].Items.Remove(profile);
+ sectionsFetchData[MembersListView.MemberListSections.Banned].Items.Remove(profile);
RefreshGrid(false);
}
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MembersListView.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MembersListView.cs
index 346d35888b3..2944ba3672c 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MembersListView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/Members/MembersListView.cs
@@ -27,10 +27,10 @@ public class MembersListView : MonoBehaviour, ICommunityFetchingView BlockUserRequested?.Invoke(lastClickedProfileCtx!), iconColor: redColor, textColor: redColor)));
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.REPORT_USER))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.ReportUser))
contextMenu.AddControl(new ButtonContextMenuControlSettings(contextMenuSettings.ReportText, contextMenuSettings.ReportOptionSprite, () => ReportUserRequested?.Invoke(lastClickedProfileCtx!), iconColor: redColor, textColor: redColor));
}
public void Close()
{
- ToggleSection(MemberListSections.MEMBERS, false);
+ ToggleSection(MemberListSections.Members, false);
confirmationDialogCts.SafeCancelAndDispose();
contextMenuCts.SafeCancelAndDispose();
}
@@ -161,7 +161,7 @@ private void OnContextMenuButtonClicked(ICommunityMemberData profile, Vector2 bu
contextMenuCts = contextMenuCts.SafeRestart();
UserProfileContextMenuControlSettings.FriendshipStatus status = profile.FriendshipStatus.Convert();
- userProfileContextMenuControlSettings!.SetInitialData(profile.Profile, status == UserProfileContextMenuControlSettings.FriendshipStatus.FRIEND ? status : UserProfileContextMenuControlSettings.FriendshipStatus.DISABLED);
+ userProfileContextMenuControlSettings!.SetInitialData(profile.Profile, status == UserProfileContextMenuControlSettings.FriendshipStatus.Friend ? status : UserProfileContextMenuControlSettings.FriendshipStatus.Disabled);
elementView.CanUnHover = false;
removeModeratorContextMenuElement!.Enabled = profile.Role == CommunityMemberRole.moderator && communityData?.role is CommunityMemberRole.owner;
@@ -186,8 +186,8 @@ private void OnContextMenuButtonClicked(ICommunityMemberData profile, Vector2 bu
? profile.Role is not CommunityMemberRole.owner
: communityData?.role is CommunityMemberRole.moderator && profile.Role is not CommunityMemberRole.owner && profile.Role is not CommunityMemberRole.moderator;
- kickUserContextMenuElement!.Enabled = viewerCanKickOrBan && currentSection == MemberListSections.MEMBERS;
- banUserContextMenuElement!.Enabled = viewerCanKickOrBan && currentSection == MemberListSections.MEMBERS;
+ kickUserContextMenuElement!.Enabled = viewerCanKickOrBan && currentSection == MemberListSections.Members;
+ banUserContextMenuElement!.Enabled = viewerCanKickOrBan && currentSection == MemberListSections.Members;
communityOptionsSeparatorContextMenuElement!.Enabled = removeModeratorContextMenuElement.Enabled ||
addModeratorContextMenuElement.Enabled ||
@@ -229,7 +229,7 @@ async UniTaskVoid ShowTransferOwnershipConfirmationDialogAsync(CancellationToken
fromUserInfo: ownProfile?.Compact ?? default(Profile.CompactInfo)), ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL) return;
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel) return;
TransferOwnershipRequested?.Invoke(profile);
}
@@ -252,7 +252,7 @@ async UniTaskVoid ShowKickConfirmationDialogAsync(CancellationToken ct)
ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL) return;
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel) return;
KickUserRequested?.Invoke(profile);
}
@@ -275,7 +275,7 @@ async UniTaskVoid ShowBanConfirmationDialogAsync(CancellationToken ct)
ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL) return;
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel) return;
BanUserRequested?.Invoke(profile);
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesCard/Places/PlacesSectionView.cs b/Explorer/Assets/DCL/Communities/CommunitiesCard/Places/PlacesSectionView.cs
index 3cacab54f20..32b12f2e7ae 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesCard/Places/PlacesSectionView.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesCard/Places/PlacesSectionView.cs
@@ -187,7 +187,7 @@ async UniTaskVoid ShowBanConfirmationDialogAsync(CancellationToken ct)
ct)
.SuppressToResultAsync(ReportCategory.COMMUNITIES);
- if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.CANCEL) return;
+ if (ct.IsCancellationRequested || !dialogResult.Success || dialogResult.Value == ConfirmationResult.Cancel) return;
ElementDeleteButtonClicked?.Invoke(placeInfo);
}
diff --git a/Explorer/Assets/DCL/Communities/CommunitiesDataProvider/DTOs/CommunitySorting.cs b/Explorer/Assets/DCL/Communities/CommunitiesDataProvider/DTOs/CommunitySorting.cs
index a8d71bf1f7a..0e252e5882e 100644
--- a/Explorer/Assets/DCL/Communities/CommunitiesDataProvider/DTOs/CommunitySorting.cs
+++ b/Explorer/Assets/DCL/Communities/CommunitiesDataProvider/DTOs/CommunitySorting.cs
@@ -3,8 +3,8 @@ namespace DCL.Communities.CommunitiesDataProvider.DTOs
{
public enum CommunitySorting
{
- name,
- popularity
+ Name,
+ Popularity
}
}
diff --git a/Explorer/Assets/DCL/Communities/CommunityCreation/CommunityCreationEditionController.cs b/Explorer/Assets/DCL/Communities/CommunityCreation/CommunityCreationEditionController.cs
index 9383b82f506..d0fe86e6de6 100644
--- a/Explorer/Assets/DCL/Communities/CommunityCreation/CommunityCreationEditionController.cs
+++ b/Explorer/Assets/DCL/Communities/CommunityCreation/CommunityCreationEditionController.cs
@@ -71,7 +71,7 @@ public class CommunityCreationEditionController : ControllerBase USER_IDS_POOL = new (defaultCapacity: 2);
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private class CommunityPlace
{
@@ -209,10 +209,10 @@ private void GoToGetNameLink() =>
webBrowser.OpenUrlMainThreadOnly(DecentralandUrl.MarketplaceClaimName);
private void DisableShortcutsInput() =>
- inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Disable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
private void RestoreInput() =>
- inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Enable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
private void OnCancelAction() =>
closeTaskCompletionSource.TrySetResult();
diff --git a/Explorer/Assets/DCL/Donations/UI/DonationsPanelController.cs b/Explorer/Assets/DCL/Donations/UI/DonationsPanelController.cs
index ac39fe8c206..7792bf6c367 100644
--- a/Explorer/Assets/DCL/Donations/UI/DonationsPanelController.cs
+++ b/Explorer/Assets/DCL/Donations/UI/DonationsPanelController.cs
@@ -24,10 +24,10 @@ public class DonationsPanelController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
public DonationsPanelController(ViewFactoryMethod viewFactory,
IDonationsService donationsService,
@@ -134,7 +134,7 @@ private void PlayEmoteByUrn(URN emoteUrn)
{
EmoteId = emoteUrn,
Spatial = true,
- TriggerSource = TriggerSource.SELF
+ TriggerSource = TriggerSource.Self
});
}
@@ -165,7 +165,7 @@ private async UniTaskVoid LoadDataAsync(CancellationToken ct)
}
(Profile.CompactInfo? creatorProfile, decimal currentBalance, decimal manaPriceUsd, string sceneName) =
- await UniTask.WhenAll(profileRepository.GetCompactAsync(creatorAddress, ct, batchBehaviour: IProfileRepository.FetchBehaviour.ENFORCE_SINGLE_GET),
+ await UniTask.WhenAll(profileRepository.GetCompactAsync(creatorAddress, ct, batchBehaviour: IProfileRepository.FetchBehaviour.EnforceSingleGet),
donationsService.GetCurrentBalanceAsync(ct),
donationsService.GetCurrentManaConversionAsync(ct),
donationsService.GetSceneNameAsync(baseParcel, ct));
diff --git a/Explorer/Assets/DCL/Donations/UI/DonationsPanelView.cs b/Explorer/Assets/DCL/Donations/UI/DonationsPanelView.cs
index ce7492c689c..1bb7b8a9f9e 100644
--- a/Explorer/Assets/DCL/Donations/UI/DonationsPanelView.cs
+++ b/Explorer/Assets/DCL/Donations/UI/DonationsPanelView.cs
@@ -10,10 +10,10 @@ public class DonationsPanelView : ViewBase, IView
{
private enum SubViews
{
- DEFAULT,
- LOADING,
- TX_CONFIRMED,
- ERROR
+ Default,
+ Loading,
+ TxConfirmed,
+ Error
}
public event Action? SendDonationRequested;
@@ -36,14 +36,14 @@ private void Awake()
donationDefaultView.buyMoreManaButton.onClick.AddListener(() => BuyMoreRequested?.Invoke());
donationErrorView.contactSupportButton.onClick.AddListener(() => ContactSupportRequested?.Invoke());
- donationErrorView.tryAgainButton.onClick.AddListener(() => ShowSubView(SubViews.DEFAULT));
+ donationErrorView.tryAgainButton.onClick.AddListener(() => ShowSubView(SubViews.Default));
donationDefaultView.SendDonationRequested += (vm, amount) => SendDonationRequested?.Invoke(vm, amount);
}
public void SetDefaultLoadingState(bool active)
{
- ShowSubView(SubViews.DEFAULT);
+ ShowSubView(SubViews.Default);
if (active)
donationDefaultView.loadingView.ShowLoading(true);
@@ -53,27 +53,27 @@ public void SetDefaultLoadingState(bool active)
public void ShowLoading(DonationPanelViewModel viewModel, decimal donationAmount, bool isThirdWeb = false)
{
- ShowSubView(SubViews.LOADING);
+ ShowSubView(SubViews.Loading);
donationLoadingView.SetWaitingMessage(isThirdWeb);
donationLoadingView.ConfigurePanel(viewModel, donationAmount);
}
public void ShowErrorModal()
{
- ShowSubView(SubViews.ERROR);
+ ShowSubView(SubViews.Error);
}
private void ShowSubView(SubViews newSubView)
{
- donationDefaultView.gameObject.SetActive(newSubView == SubViews.DEFAULT);
- donationConfirmedView.gameObject.SetActive(newSubView == SubViews.TX_CONFIRMED);
- donationErrorView.gameObject.SetActive(newSubView == SubViews.ERROR);
- donationLoadingView.gameObject.SetActive(newSubView == SubViews.LOADING);
+ donationDefaultView.gameObject.SetActive(newSubView == SubViews.Default);
+ donationConfirmedView.gameObject.SetActive(newSubView == SubViews.TxConfirmed);
+ donationErrorView.gameObject.SetActive(newSubView == SubViews.Error);
+ donationLoadingView.gameObject.SetActive(newSubView == SubViews.Loading);
}
public async UniTask ShowTxConfirmedAsync(DonationPanelViewModel viewModel, CancellationToken ct)
{
- ShowSubView(SubViews.TX_CONFIRMED);
+ ShowSubView(SubViews.TxConfirmed);
await donationConfirmedView.ShowAsync(viewModel, ct);
}
diff --git a/Explorer/Assets/DCL/EmojiPanel/EmojiPanelPresenter.cs b/Explorer/Assets/DCL/EmojiPanel/EmojiPanelPresenter.cs
index 39b79097e62..9c596cbef3f 100644
--- a/Explorer/Assets/DCL/EmojiPanel/EmojiPanelPresenter.cs
+++ b/Explorer/Assets/DCL/EmojiPanel/EmojiPanelPresenter.cs
@@ -251,7 +251,7 @@ private void BlockShortcuts()
if (inputBlock == null || shortcutsBlocked) return;
shortcutsBlocked = true;
- inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Disable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
}
private void RestoreShortcuts()
@@ -259,7 +259,7 @@ private void RestoreShortcuts()
if (inputBlock == null || !shortcutsBlocked) return;
shortcutsBlocked = false;
- inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
+ inputBlock.Enable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera);
}
private void OnEmojiSelected(string code)
diff --git a/Explorer/Assets/DCL/EmotesWheel/EmotesWheelController.cs b/Explorer/Assets/DCL/EmotesWheel/EmotesWheelController.cs
index 2cffe5994df..aa424eb4178 100644
--- a/Explorer/Assets/DCL/EmotesWheel/EmotesWheelController.cs
+++ b/Explorer/Assets/DCL/EmotesWheel/EmotesWheelController.cs
@@ -40,7 +40,7 @@ public class EmotesWheelController : ControllerBase
private CancellationTokenSource? slotSetUpCts;
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
public EmotesWheelController(ViewFactoryMethod viewFactory,
SelfProfile selfProfile,
@@ -234,19 +234,19 @@ private void OpenBackpack()
private void UnblockUnwantedInputs()
{
- inputBlock.Disable(InputMapComponent.Kind.EMOTES);
+ inputBlock.Disable(InputMapComponent.Kind.Emotes);
}
// Note: This must be called once the menu has loaded and is ready to be closed
private void UnblockShortcutToEmoteSlotsSetup()
{
- inputBlock.Enable(InputMapComponent.Kind.EMOTE_WHEEL);
+ inputBlock.Enable(InputMapComponent.Kind.EmoteWheel);
}
private void BlockUnwantedInputs()
{
- inputBlock.Disable(InputMapComponent.Kind.EMOTE_WHEEL);
- inputBlock.Enable(InputMapComponent.Kind.EMOTES);
+ inputBlock.Disable(InputMapComponent.Kind.EmoteWheel);
+ inputBlock.Enable(InputMapComponent.Kind.Emotes);
}
private void ListenToSlotsInput(InputActionMap inputActionMap)
diff --git a/Explorer/Assets/DCL/Events/EventDetailPanelController.cs b/Explorer/Assets/DCL/Events/EventDetailPanelController.cs
index d32efadc3f8..5e8fb4854c6 100644
--- a/Explorer/Assets/DCL/Events/EventDetailPanelController.cs
+++ b/Explorer/Assets/DCL/Events/EventDetailPanelController.cs
@@ -12,7 +12,7 @@ public class EventDetailPanelController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private readonly ThumbnailLoader? eventCardThumbnailLoader;
private CancellationTokenSource panelCts = new ();
diff --git a/Explorer/Assets/DCL/Events/EventsByDayController.cs b/Explorer/Assets/DCL/Events/EventsByDayController.cs
index 8afb8b1f30a..73f4b4b1200 100644
--- a/Explorer/Assets/DCL/Events/EventsByDayController.cs
+++ b/Explorer/Assets/DCL/Events/EventsByDayController.cs
@@ -74,17 +74,17 @@ public void Dispose()
}
private void OnBackButtonClicked() =>
- eventsController.OpenSection(EventsSection.CALENDAR, eventsController.CurrentCalendarFromDate);
+ eventsController.OpenSection(EventsSection.Calendar, eventsController.CurrentCalendarFromDate);
private void OnGoToNextDayButtonClicked() =>
- eventsController.OpenSection(EventsSection.EVENTS_BY_DAY, currentDay.AddDays(1));
+ eventsController.OpenSection(EventsSection.EventsByDay, currentDay.AddDays(1));
private void OnEventCardClicked(EventDTO eventInfo, PlacesData.PlaceInfo? placeInfo, EventCardView eventCardView) =>
mvcManager.ShowAsync(EventDetailPanelController.IssueCommand(new EventDetailPanelParameter(eventInfo, placeInfo, eventCardView))).Forget();
private void OnSectionOpen(EventsSection section, DateTime date)
{
- if (section != EventsSection.EVENTS_BY_DAY)
+ if (section != EventsSection.EventsByDay)
return;
loadEventsCts = loadEventsCts.SafeRestart();
diff --git a/Explorer/Assets/DCL/Events/EventsCalendarController.cs b/Explorer/Assets/DCL/Events/EventsCalendarController.cs
index 3e4f1fe266d..b21a83954e9 100644
--- a/Explorer/Assets/DCL/Events/EventsCalendarController.cs
+++ b/Explorer/Assets/DCL/Events/EventsCalendarController.cs
@@ -99,7 +99,7 @@ public void Dispose()
private void OnSectionOpened(EventsSection section, DateTime fromDate)
{
- if (section != EventsSection.CALENDAR)
+ if (section != EventsSection.Calendar)
return;
loadEventsCts = loadEventsCts.SafeRestart();
@@ -110,7 +110,7 @@ private void OnSectionClosed() =>
UnloadEvents();
private void OnGoToTodayClicked() =>
- eventsController.OpenSection(EventsSection.CALENDAR);
+ eventsController.OpenSection(EventsSection.Calendar);
private void OnDaysRangeChanged(DateTime fromDate, int numberOfDays)
{
@@ -119,7 +119,7 @@ private void OnDaysRangeChanged(DateTime fromDate, int numberOfDays)
}
private void OnDaySelectorButtonClicked(DateTime date) =>
- eventsController.OpenSection(EventsSection.EVENTS_BY_DAY, date);
+ eventsController.OpenSection(EventsSection.EventsByDay, date);
private void OnEventCardClicked(EventDTO eventInfo, PlacesData.PlaceInfo? placeInfo, EventCardView eventCardView)
{
diff --git a/Explorer/Assets/DCL/Events/EventsController.cs b/Explorer/Assets/DCL/Events/EventsController.cs
index 16c965921cf..926e9145566 100644
--- a/Explorer/Assets/DCL/Events/EventsController.cs
+++ b/Explorer/Assets/DCL/Events/EventsController.cs
@@ -99,7 +99,7 @@ public void Activate()
isSectionActivated = true;
view.SetViewActive(true);
cursor.Unlock();
- OpenSection(EventsSection.CALENDAR);
+ OpenSection(EventsSection.Calendar);
}
public void Deactivate()
diff --git a/Explorer/Assets/DCL/Events/EventsSection.cs b/Explorer/Assets/DCL/Events/EventsSection.cs
index 30022e49724..a9ad63c3aa1 100644
--- a/Explorer/Assets/DCL/Events/EventsSection.cs
+++ b/Explorer/Assets/DCL/Events/EventsSection.cs
@@ -2,7 +2,7 @@
{
public enum EventsSection
{
- CALENDAR,
- EVENTS_BY_DAY,
+ Calendar,
+ EventsByDay,
}
}
diff --git a/Explorer/Assets/DCL/Events/EventsView.cs b/Explorer/Assets/DCL/Events/EventsView.cs
index b05b7ecbc7b..575484e1e42 100644
--- a/Explorer/Assets/DCL/Events/EventsView.cs
+++ b/Explorer/Assets/DCL/Events/EventsView.cs
@@ -57,8 +57,8 @@ public void ResetAnimator()
public void OpenSection(EventsSection section)
{
- eventsCalendarView.gameObject.SetActive(section == EventsSection.CALENDAR);
- eventsByDayView.gameObject.SetActive(section == EventsSection.EVENTS_BY_DAY);
+ eventsCalendarView.gameObject.SetActive(section == EventsSection.Calendar);
+ eventsByDayView.gameObject.SetActive(section == EventsSection.EventsByDay);
}
}
}
diff --git a/Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs b/Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs
index f2af676a4aa..4dfa308a2a3 100644
--- a/Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs
+++ b/Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs
@@ -1,497 +1,497 @@
-using Cysharp.Threading.Tasks;
-using DCL.Backpack;
-using DCL.Communities;
-using DCL.Communities.CommunitiesBrowser;
-using DCL.Credits;
-using DCL.FeatureFlags;
-using DCL.Diagnostics;
-using DCL.Events;
-using DCL.EventsApi;
-using DCL.Input;
-using DCL.Input.Component;
-using DCL.InWorldCamera.CameraReelGallery;
-using DCL.Navmap;
-using DCL.NotificationsBus;
-using DCL.NotificationsBus.NotificationTypes;
-using DCL.Places;
-using DCL.Settings;
-using DCL.UI;
-using DCL.UI.ProfileElements;
-using DCL.UI.Profiles;
-using DCL.Utilities;
-using DCL.Utilities.Extensions;
-using DCL.Utility.Types;
-using DCL.VoiceChat;
-using MVC;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using UnityEngine.EventSystems;
-using UnityEngine.InputSystem;
-using Utility;
-
-namespace DCL.ExplorePanel
-{
- public class ExplorePanelController : ControllerBase
- {
- private readonly BackpackController backpackController;
- private readonly SidebarProfileButtonPresenter profileButtonPresenter;
- private readonly ProfileMenuController profileMenuController;
- private readonly DCLInput dclInput;
- private readonly IInputBlock inputBlock;
- private readonly bool includeCameraReel;
- private readonly IMVCManager mvcManager;
- private readonly bool includeDiscover;
- private readonly HttpEventsApiService eventsApiService;
- private readonly JoinedCommunitiesVoiceLiveTracker communitiesLiveTracker;
- private readonly ICreditsPanelController creditsPanelController;
- private bool includeCommunities;
-
- private ReactivePropertyExtensions.DisposableSubscription? communitiesLiveBadgeSubscription;
-
- private Dictionary tabsBySections;
- private Dictionary exploreSections;
- private SectionSelectorController sectionSelectorController;
- private CancellationTokenSource? animationCts;
- private CancellationTokenSource? profileMenuCts;
- private CancellationTokenSource setupExploreSectionsCts;
- private CancellationTokenSource checkForLiveEventsCts;
- private TabSelectorView? previousSelector;
- private ExploreSections lastShownSection;
- private bool isControlClosing;
-
- private CommunitiesBrowserController communitiesBrowserController { get; }
- public NavmapController NavmapController { get; }
- public CameraReelController CameraReelController { get; }
- public SettingsController SettingsController { get; }
- public CommunitiesBrowserController CommunitiesBrowserController { get; }
- public PlacesController PlacesController { get; }
- public EventsController EventsController { get; }
-
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.FULLSCREEN;
-
- public bool CanBeClosedByEscape => State != ControllerState.ViewShowing;
-
- public event Action? PlacesOpenedFromStartMenu;
- public event Action? EventsOpenedFromStartMenu;
-
- public ExplorePanelController(ViewFactoryMethod viewFactory,
- NavmapController navmapController,
- SettingsController settingsController,
- BackpackController backpackController,
- CameraReelController cameraReelController,
- SidebarProfileButtonPresenter profileButtonPresenter,
- ProfileMenuController profileMenuController,
- CommunitiesBrowserController communitiesBrowserController,
- PlacesController placesController,
- EventsController eventsController,
- IInputBlock inputBlock,
- HttpEventsApiService eventsApiService,
- IMVCManager mvcManager,
- JoinedCommunitiesVoiceLiveTracker communitiesLiveTracker,
- ICreditsPanelController creditsPanelController)
- : base(viewFactory)
- {
- NavmapController = navmapController;
- SettingsController = settingsController;
- this.backpackController = backpackController;
- CameraReelController = cameraReelController;
- this.profileButtonPresenter = profileButtonPresenter;
- dclInput = DCLInput.Instance;
- this.profileMenuController = profileMenuController;
- this.inputBlock = inputBlock;
- this.includeCameraReel = FeaturesRegistry.Instance.IsEnabled(FeatureId.CAMERA_REEL);
- this.mvcManager = mvcManager;
- this.communitiesBrowserController = communitiesBrowserController;
- this.includeDiscover = FeaturesRegistry.Instance.IsEnabled(FeatureId.DISCOVER);
- this.eventsApiService = eventsApiService;
- this.communitiesLiveTracker = communitiesLiveTracker;
- this.creditsPanelController = creditsPanelController;
- CommunitiesBrowserController = communitiesBrowserController;
- PlacesController = placesController;
-
- NotificationsBusController.Instance.SubscribeToNotificationTypeClick(NotificationType.REWARD_ASSIGNMENT, p => OnShowSectionFromNotificationAsync(p, ExploreSections.Backpack).Forget());
-
- EventsController = eventsController;
- }
-
- public override void Dispose()
- {
- base.Dispose();
-
- profileMenuCts.SafeCancelAndDispose();
- setupExploreSectionsCts.SafeCancelAndDispose();
- checkForLiveEventsCts.SafeCancelAndDispose();
-
- communitiesLiveBadgeSubscription?.Dispose();
- }
-
- private async UniTaskVoid OnShowSectionFromNotificationAsync(object[] _, ExploreSections sectionToShow)
- {
- if (State == ControllerState.ViewHidden)
- await mvcManager.ShowAsync(ExplorePanelController.IssueCommand(new ExplorePanelParameter(sectionToShow)));
- else
- ShowSection(sectionToShow);
- }
-
- protected override void OnViewInstantiated()
- {
- setupExploreSectionsCts = setupExploreSectionsCts.SafeRestart();
- SetupExploreSectionsAsync(setupExploreSectionsCts.Token).Forget();
- viewInstance!.SetLiveEventsCounter(0);
-
- viewInstance.CommunitiesLiveBadge.SetActive(communitiesLiveTracker.HasAnyJoinedCommunityLive.Value);
- communitiesLiveBadgeSubscription = communitiesLiveTracker.HasAnyJoinedCommunityLive.Subscribe(OnCommunitiesLiveStateChanged);
- }
-
- private void OnCommunitiesLiveStateChanged(bool hasAnyLive)
- {
- if (viewInstance != null)
- viewInstance.CommunitiesLiveBadge.SetActive(hasAnyLive);
- }
-
- private async UniTaskVoid SetupExploreSectionsAsync(CancellationToken ct)
- {
- exploreSections = new Dictionary
- {
- { ExploreSections.Navmap, NavmapController },
- { ExploreSections.Settings, SettingsController },
- { ExploreSections.Backpack, backpackController },
- { ExploreSections.CameraReel, CameraReelController },
- { ExploreSections.Communities, CommunitiesBrowserController },
- { ExploreSections.Places, PlacesController },
- { ExploreSections.Events, EventsController },
- };
-
- includeCommunities = await CommunitiesFeatureAccess.Instance.IsUserAllowedToUseTheFeatureAsync(ct);
-
- lastShownSection = includeDiscover ? ExploreSections.Events : includeCommunities ? ExploreSections.Communities : ExploreSections.Navmap;
-
- sectionSelectorController = new SectionSelectorController(exploreSections, lastShownSection);
-
- foreach (KeyValuePair keyValuePair in exploreSections)
- keyValuePair.Value.Deactivate();
-
- tabsBySections = viewInstance!.TabSelectorMappedViews.ToDictionary(map => map.Section, map => map.TabSelectorViews);
-
- foreach ((ExploreSections section, TabSelectorView? tabSelector) in tabsBySections)
- {
- tabSelector.TabSelectorToggle.onValueChanged.RemoveAllListeners();
-
- if ((section == ExploreSections.CameraReel && !includeCameraReel) ||
- (section == ExploreSections.Communities && !includeCommunities) ||
- (section == ExploreSections.Places && !includeDiscover) ||
- (section == ExploreSections.Events && !includeDiscover))
- {
- tabSelector.gameObject.SetActive(false);
- continue;
- }
-
- tabSelector.TabSelectorToggle.onValueChanged.AddListener(isOn =>
- {
- ToggleSection(isOn, tabSelector, section, true);
-
- if (!isOn) return;
-
- switch (section)
- {
- case ExploreSections.Places:
- PlacesOpenedFromStartMenu?.Invoke();
- break;
- case ExploreSections.Events:
- EventsOpenedFromStartMenu?.Invoke();
- break;
- }
-
- }
- );
- }
-
- viewInstance?.ProfileWidget?.OpenProfileButton?.Button?.onClick.AddListener(ShowProfileMenuAsync);
- }
-
- protected override void OnViewShow()
- {
- isControlClosing = false;
- sectionSelectorController.ResetAnimators();
-
- ExploreSections sectionToShow = inputData.IsSectionProvided ? inputData.Section : lastShownSection;
-
- foreach ((ExploreSections section, TabSelectorView? tab) in tabsBySections)
- {
- ToggleSection(section == sectionToShow, tab, section, true);
- sectionSelectorController.SetAnimationState(section == sectionToShow, tabsBySections[section]);
- }
-
- if (inputData.BackpackSection != null)
- backpackController.Toggle(inputData.BackpackSection.Value);
-
- if (inputData.SettingsSection != null)
- SettingsController.Toggle(inputData.SettingsSection.Value);
-
- profileButtonPresenter.LoadProfile();
-
- profileMenuCts = profileMenuCts.SafeRestart();
-
- if (profileMenuController.State is ControllerState.ViewFocused or ControllerState.ViewBlurred)
- profileMenuController.HideViewAsync(CancellationToken.None).Forget();
-
- BlockUnwantedInputs();
- RegisterHotkeys();
-
- checkForLiveEventsCts = checkForLiveEventsCts.SafeRestart();
- FillLiveEventsAsync(checkForLiveEventsCts.Token).Forget();
-
- if (inputData.IsSectionProvided)
- return;
-
- // Only triggers OpenedFromStartMenu events if IsSectionProvided is false.
- // This means that the section has not opened by shortcut nor sidebar.
- switch (sectionToShow)
- {
- case ExploreSections.Places:
- PlacesOpenedFromStartMenu?.Invoke();
- break;
- case ExploreSections.Events:
- EventsOpenedFromStartMenu?.Invoke();
- break;
- }
- }
-
- private void ToggleSection(bool isOn, TabSelectorView tabSelectorView, ExploreSections shownSection, bool animate)
- {
- if (isOn && animate && shownSection != lastShownSection)
- sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
-
- animationCts.SafeCancelAndDispose();
- animationCts = new CancellationTokenSource();
- sectionSelectorController.OnTabSelectorToggleValueChangedAsync(isOn, tabSelectorView, shownSection, animationCts.Token, animate).Forget();
-
- if (!isOn) return;
-
- if (shownSection == lastShownSection)
- exploreSections[lastShownSection].Activate();
-
- lastShownSection = shownSection;
- }
-
- private void RegisterHotkeys()
- {
- dclInput.Shortcuts.MainMenu.canceled += OnCloseMainMenu;
- dclInput.Shortcuts.Map.performed += OnMapHotkeyPressed;
- dclInput.Shortcuts.Settings.performed += OnSettingsHotkeyPressed;
- dclInput.Shortcuts.Backpack.performed += OnBackpackHotkeyPressed;
- dclInput.Shortcuts.Communities.performed += OnCommunitiesHotkeyPressed;
- dclInput.Shortcuts.Places.performed += OnPlacesHotkeyPressed;
- dclInput.Shortcuts.Events.performed += OnEventsHotkeyPressed;
- dclInput.Shortcuts.CameraReel.performed += OnCameraReelHotkeyPressed;
- }
-
- private void OnCameraReelHotkeyPressed(InputAction.CallbackContext ctx)
- {
- if (!includeCameraReel) return;
-
- if (lastShownSection != ExploreSections.CameraReel)
- {
- sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
- ShowSection(ExploreSections.CameraReel);
- }
- else
- isControlClosing = true;
- }
-
- private void OnCloseMainMenu(InputAction.CallbackContext obj)
- {
- // Search bar could be focused when closing the menu, so we need to remove the focus,
- // which will also re-enable shortcuts
- EventSystem.current.SetSelectedGameObject(null);
-
- profileMenuController.HideViewAsync(CancellationToken.None).Forget();
- isControlClosing = true;
- }
-
- private void OnMapHotkeyPressed(InputAction.CallbackContext obj)
- {
- if (lastShownSection != ExploreSections.Navmap)
- {
- sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
- ShowSection(ExploreSections.Navmap);
- }
- else
- isControlClosing = true;
- }
-
- private void OnSettingsHotkeyPressed(InputAction.CallbackContext obj)
- {
- if (lastShownSection != ExploreSections.Settings)
- {
- sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
- ShowSection(ExploreSections.Settings);
- }
- else
- isControlClosing = true;
- }
-
- private void OnCommunitiesHotkeyPressed(InputAction.CallbackContext obj)
- {
- if (!includeCommunities) return;
-
- if (lastShownSection != ExploreSections.Communities)
- {
- sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
- ShowSection(ExploreSections.Communities);
- }
- else
- isControlClosing = true;
- }
-
- private void OnPlacesHotkeyPressed(InputAction.CallbackContext obj)
- {
- if (!includeDiscover) return;
-
- if (lastShownSection != ExploreSections.Places)
- {
- sectionSelectorController.SetAnimationState(false, tabsBySections![lastShownSection]);
- ShowSection(ExploreSections.Places);
- }
- else
- isControlClosing = true;
- }
-
- private void OnEventsHotkeyPressed(InputAction.CallbackContext obj)
- {
- if (!includeDiscover) return;
-
- if (lastShownSection != ExploreSections.Events)
- {
- sectionSelectorController.SetAnimationState(false, tabsBySections![lastShownSection]);
- ShowSection(ExploreSections.Events);
- }
- else
- isControlClosing = true;
- }
-
- private void OnBackpackHotkeyPressed(InputAction.CallbackContext obj)
- {
- if (lastShownSection != ExploreSections.Backpack)
- {
- sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
- ShowSection(ExploreSections.Backpack);
- }
- else
- isControlClosing = true;
- }
-
- private void ShowSection(ExploreSections section)
- {
- ToggleSection(true, tabsBySections[section], section, true);
- }
-
- protected override void OnViewClose()
- {
- foreach (ISection exploreSectionsValue in exploreSections.Values)
- exploreSectionsValue.Deactivate();
-
- if (profileMenuController.State is ControllerState.ViewFocused or ControllerState.ViewBlurred)
- profileMenuController.HideViewAsync(CancellationToken.None).Forget();
-
- profileMenuCts.SafeCancelAndDispose();
- checkForLiveEventsCts.SafeCancelAndDispose();
-
- UnblockUnwantedInputs();
- UnRegisterHotkeys();
- }
-
- private void UnRegisterHotkeys()
- {
- dclInput.Shortcuts.MainMenu.canceled -= OnCloseMainMenu;
- dclInput.Shortcuts.Map.performed -= OnMapHotkeyPressed;
- dclInput.Shortcuts.Settings.performed -= OnSettingsHotkeyPressed;
- dclInput.Shortcuts.Backpack.performed -= OnBackpackHotkeyPressed;
- dclInput.Shortcuts.Communities.performed -= OnCommunitiesHotkeyPressed;
- dclInput.Shortcuts.Places.performed -= OnPlacesHotkeyPressed;
- dclInput.Shortcuts.Events.performed -= OnEventsHotkeyPressed;
- dclInput.Shortcuts.CameraReel.performed -= OnCameraReelHotkeyPressed;
- }
-
- private void BlockUnwantedInputs()
- {
- inputBlock.Disable(InputMapComponent.Kind.CAMERA, InputMapComponent.Kind.PLAYER);
- }
-
- private void UnblockUnwantedInputs()
- {
- inputBlock.Enable(InputMapComponent.Kind.CAMERA, InputMapComponent.Kind.PLAYER);
- }
-
- protected override async UniTask WaitForCloseIntentAsync(CancellationToken ct)
- {
- await UniTask.WhenAny(viewInstance!.CloseButton.OnClickAsync(ct),
- UniTask.WaitUntil(() => isControlClosing, PlayerLoopTiming.Update, ct),
- viewInstance.ProfileMenuView.SystemMenuView.LogoutButton.OnClickAsync(ct));
- }
-
- private async void ShowProfileMenuAsync()
- {
- profileMenuCts = profileMenuCts.SafeRestart();
-
- if (profileMenuController.State != ControllerState.ViewHidden)
- return;
-
- try
- {
- viewInstance!.ProfileMenuCloserButton.gameObject.SetActive(true);
- viewInstance.ProfileMenuCloserButton.onClick.AddListener(OnProfileMenuCloserClicked);
-
- await profileMenuController.LaunchViewLifeCycleAsync(new CanvasOrdering(CanvasOrdering.SortingLayer.POPUP, 0), new ControllerNoData(), profileMenuCts.Token);
- await profileMenuController.HideViewAsync(CancellationToken.None);
- }
- catch (OperationCanceledException)
- {
- // Cancellations ignored
- }
- finally
- {
- if (viewInstance != null)
- {
- viewInstance.ProfileMenuCloserButton.onClick.RemoveListener(OnProfileMenuCloserClicked);
- viewInstance.ProfileMenuCloserButton.gameObject.SetActive(false);
- }
- }
- }
-
- private void OnProfileMenuCloserClicked() =>
- profileMenuCts?.Cancel();
-
- private async UniTaskVoid FillLiveEventsAsync(CancellationToken ct)
- {
- Result> liveEventsResult = await eventsApiService.GetEventsAsync(ct, onlyLiveEvents: true).SuppressToResultAsync(ReportCategory.EVENTS);
-
- if (ct.IsCancellationRequested)
- return;
-
- viewInstance!.SetLiveEventsCounter(liveEventsResult.Success ? liveEventsResult.Value.Count : 0);
- }
- }
-
- public readonly struct ExplorePanelParameter
- {
- public readonly ExploreSections Section;
- public readonly BackpackSections? BackpackSection;
- public readonly SettingsController.SettingsSection? SettingsSection;
-
- ///
- /// Whether a specific section has to be opened when the explore panel is shown or not (using the default one).
- ///
- public readonly bool IsSectionProvided;
-
- public ExplorePanelParameter(ExploreSections section, BackpackSections? backpackSection = null, SettingsController.SettingsSection? settingsSection = null)
- {
- Section = section;
- BackpackSection = backpackSection;
- SettingsSection = settingsSection;
- IsSectionProvided = true;
- }
- }
-}
+using Cysharp.Threading.Tasks;
+using DCL.Backpack;
+using DCL.Communities;
+using DCL.Communities.CommunitiesBrowser;
+using DCL.Credits;
+using DCL.FeatureFlags;
+using DCL.Diagnostics;
+using DCL.Events;
+using DCL.EventsApi;
+using DCL.Input;
+using DCL.Input.Component;
+using DCL.InWorldCamera.CameraReelGallery;
+using DCL.Navmap;
+using DCL.NotificationsBus;
+using DCL.NotificationsBus.NotificationTypes;
+using DCL.Places;
+using DCL.Settings;
+using DCL.UI;
+using DCL.UI.ProfileElements;
+using DCL.UI.Profiles;
+using DCL.Utilities;
+using DCL.Utilities.Extensions;
+using DCL.Utility.Types;
+using DCL.VoiceChat;
+using MVC;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using UnityEngine.EventSystems;
+using UnityEngine.InputSystem;
+using Utility;
+
+namespace DCL.ExplorePanel
+{
+ public class ExplorePanelController : ControllerBase
+ {
+ private readonly BackpackController backpackController;
+ private readonly SidebarProfileButtonPresenter profileButtonPresenter;
+ private readonly ProfileMenuController profileMenuController;
+ private readonly DCLInput dclInput;
+ private readonly IInputBlock inputBlock;
+ private readonly bool includeCameraReel;
+ private readonly IMVCManager mvcManager;
+ private readonly bool includeDiscover;
+ private readonly HttpEventsApiService eventsApiService;
+ private readonly JoinedCommunitiesVoiceLiveTracker communitiesLiveTracker;
+ private readonly ICreditsPanelController creditsPanelController;
+ private bool includeCommunities;
+
+ private ReactivePropertyExtensions.DisposableSubscription? communitiesLiveBadgeSubscription;
+
+ private Dictionary tabsBySections;
+ private Dictionary exploreSections;
+ private SectionSelectorController sectionSelectorController;
+ private CancellationTokenSource? animationCts;
+ private CancellationTokenSource? profileMenuCts;
+ private CancellationTokenSource setupExploreSectionsCts;
+ private CancellationTokenSource checkForLiveEventsCts;
+ private TabSelectorView? previousSelector;
+ private ExploreSections lastShownSection;
+ private bool isControlClosing;
+
+ private CommunitiesBrowserController communitiesBrowserController { get; }
+ public NavmapController NavmapController { get; }
+ public CameraReelController CameraReelController { get; }
+ public SettingsController SettingsController { get; }
+ public CommunitiesBrowserController CommunitiesBrowserController { get; }
+ public PlacesController PlacesController { get; }
+ public EventsController EventsController { get; }
+
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Fullscreen;
+
+ public bool CanBeClosedByEscape => State != ControllerState.ViewShowing;
+
+ public event Action? PlacesOpenedFromStartMenu;
+ public event Action? EventsOpenedFromStartMenu;
+
+ public ExplorePanelController(ViewFactoryMethod viewFactory,
+ NavmapController navmapController,
+ SettingsController settingsController,
+ BackpackController backpackController,
+ CameraReelController cameraReelController,
+ SidebarProfileButtonPresenter profileButtonPresenter,
+ ProfileMenuController profileMenuController,
+ CommunitiesBrowserController communitiesBrowserController,
+ PlacesController placesController,
+ EventsController eventsController,
+ IInputBlock inputBlock,
+ HttpEventsApiService eventsApiService,
+ IMVCManager mvcManager,
+ JoinedCommunitiesVoiceLiveTracker communitiesLiveTracker,
+ ICreditsPanelController creditsPanelController)
+ : base(viewFactory)
+ {
+ NavmapController = navmapController;
+ SettingsController = settingsController;
+ this.backpackController = backpackController;
+ CameraReelController = cameraReelController;
+ this.profileButtonPresenter = profileButtonPresenter;
+ dclInput = DCLInput.Instance;
+ this.profileMenuController = profileMenuController;
+ this.inputBlock = inputBlock;
+ this.includeCameraReel = FeaturesRegistry.Instance.IsEnabled(FeatureId.CameraReel);
+ this.mvcManager = mvcManager;
+ this.communitiesBrowserController = communitiesBrowserController;
+ this.includeDiscover = FeaturesRegistry.Instance.IsEnabled(FeatureId.Discover);
+ this.eventsApiService = eventsApiService;
+ this.communitiesLiveTracker = communitiesLiveTracker;
+ this.creditsPanelController = creditsPanelController;
+ CommunitiesBrowserController = communitiesBrowserController;
+ PlacesController = placesController;
+
+ NotificationsBusController.Instance.SubscribeToNotificationTypeClick(NotificationType.REWARD_ASSIGNMENT, p => OnShowSectionFromNotificationAsync(p, ExploreSections.Backpack).Forget());
+
+ EventsController = eventsController;
+ }
+
+ public override void Dispose()
+ {
+ base.Dispose();
+
+ profileMenuCts.SafeCancelAndDispose();
+ setupExploreSectionsCts.SafeCancelAndDispose();
+ checkForLiveEventsCts.SafeCancelAndDispose();
+
+ communitiesLiveBadgeSubscription?.Dispose();
+ }
+
+ private async UniTaskVoid OnShowSectionFromNotificationAsync(object[] _, ExploreSections sectionToShow)
+ {
+ if (State == ControllerState.ViewHidden)
+ await mvcManager.ShowAsync(ExplorePanelController.IssueCommand(new ExplorePanelParameter(sectionToShow)));
+ else
+ ShowSection(sectionToShow);
+ }
+
+ protected override void OnViewInstantiated()
+ {
+ setupExploreSectionsCts = setupExploreSectionsCts.SafeRestart();
+ SetupExploreSectionsAsync(setupExploreSectionsCts.Token).Forget();
+ viewInstance!.SetLiveEventsCounter(0);
+
+ viewInstance.CommunitiesLiveBadge.SetActive(communitiesLiveTracker.HasAnyJoinedCommunityLive.Value);
+ communitiesLiveBadgeSubscription = communitiesLiveTracker.HasAnyJoinedCommunityLive.Subscribe(OnCommunitiesLiveStateChanged);
+ }
+
+ private void OnCommunitiesLiveStateChanged(bool hasAnyLive)
+ {
+ if (viewInstance != null)
+ viewInstance.CommunitiesLiveBadge.SetActive(hasAnyLive);
+ }
+
+ private async UniTaskVoid SetupExploreSectionsAsync(CancellationToken ct)
+ {
+ exploreSections = new Dictionary
+ {
+ { ExploreSections.Navmap, NavmapController },
+ { ExploreSections.Settings, SettingsController },
+ { ExploreSections.Backpack, backpackController },
+ { ExploreSections.CameraReel, CameraReelController },
+ { ExploreSections.Communities, CommunitiesBrowserController },
+ { ExploreSections.Places, PlacesController },
+ { ExploreSections.Events, EventsController },
+ };
+
+ includeCommunities = await CommunitiesFeatureAccess.Instance.IsUserAllowedToUseTheFeatureAsync(ct);
+
+ lastShownSection = includeDiscover ? ExploreSections.Events : includeCommunities ? ExploreSections.Communities : ExploreSections.Navmap;
+
+ sectionSelectorController = new SectionSelectorController(exploreSections, lastShownSection);
+
+ foreach (KeyValuePair keyValuePair in exploreSections)
+ keyValuePair.Value.Deactivate();
+
+ tabsBySections = viewInstance!.TabSelectorMappedViews.ToDictionary(map => map.Section, map => map.TabSelectorViews);
+
+ foreach ((ExploreSections section, TabSelectorView? tabSelector) in tabsBySections)
+ {
+ tabSelector.TabSelectorToggle.onValueChanged.RemoveAllListeners();
+
+ if ((section == ExploreSections.CameraReel && !includeCameraReel) ||
+ (section == ExploreSections.Communities && !includeCommunities) ||
+ (section == ExploreSections.Places && !includeDiscover) ||
+ (section == ExploreSections.Events && !includeDiscover))
+ {
+ tabSelector.gameObject.SetActive(false);
+ continue;
+ }
+
+ tabSelector.TabSelectorToggle.onValueChanged.AddListener(isOn =>
+ {
+ ToggleSection(isOn, tabSelector, section, true);
+
+ if (!isOn) return;
+
+ switch (section)
+ {
+ case ExploreSections.Places:
+ PlacesOpenedFromStartMenu?.Invoke();
+ break;
+ case ExploreSections.Events:
+ EventsOpenedFromStartMenu?.Invoke();
+ break;
+ }
+
+ }
+ );
+ }
+
+ viewInstance?.ProfileWidget?.OpenProfileButton?.Button?.onClick.AddListener(ShowProfileMenuAsync);
+ }
+
+ protected override void OnViewShow()
+ {
+ isControlClosing = false;
+ sectionSelectorController.ResetAnimators();
+
+ ExploreSections sectionToShow = inputData.IsSectionProvided ? inputData.Section : lastShownSection;
+
+ foreach ((ExploreSections section, TabSelectorView? tab) in tabsBySections)
+ {
+ ToggleSection(section == sectionToShow, tab, section, true);
+ sectionSelectorController.SetAnimationState(section == sectionToShow, tabsBySections[section]);
+ }
+
+ if (inputData.BackpackSection != null)
+ backpackController.Toggle(inputData.BackpackSection.Value);
+
+ if (inputData.SettingsSection != null)
+ SettingsController.Toggle(inputData.SettingsSection.Value);
+
+ profileButtonPresenter.LoadProfile();
+
+ profileMenuCts = profileMenuCts.SafeRestart();
+
+ if (profileMenuController.State is ControllerState.ViewFocused or ControllerState.ViewBlurred)
+ profileMenuController.HideViewAsync(CancellationToken.None).Forget();
+
+ BlockUnwantedInputs();
+ RegisterHotkeys();
+
+ checkForLiveEventsCts = checkForLiveEventsCts.SafeRestart();
+ FillLiveEventsAsync(checkForLiveEventsCts.Token).Forget();
+
+ if (inputData.IsSectionProvided)
+ return;
+
+ // Only triggers OpenedFromStartMenu events if IsSectionProvided is false.
+ // This means that the section has not opened by shortcut nor sidebar.
+ switch (sectionToShow)
+ {
+ case ExploreSections.Places:
+ PlacesOpenedFromStartMenu?.Invoke();
+ break;
+ case ExploreSections.Events:
+ EventsOpenedFromStartMenu?.Invoke();
+ break;
+ }
+ }
+
+ private void ToggleSection(bool isOn, TabSelectorView tabSelectorView, ExploreSections shownSection, bool animate)
+ {
+ if (isOn && animate && shownSection != lastShownSection)
+ sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
+
+ animationCts.SafeCancelAndDispose();
+ animationCts = new CancellationTokenSource();
+ sectionSelectorController.OnTabSelectorToggleValueChangedAsync(isOn, tabSelectorView, shownSection, animationCts.Token, animate).Forget();
+
+ if (!isOn) return;
+
+ if (shownSection == lastShownSection)
+ exploreSections[lastShownSection].Activate();
+
+ lastShownSection = shownSection;
+ }
+
+ private void RegisterHotkeys()
+ {
+ dclInput.Shortcuts.MainMenu.canceled += OnCloseMainMenu;
+ dclInput.Shortcuts.Map.performed += OnMapHotkeyPressed;
+ dclInput.Shortcuts.Settings.performed += OnSettingsHotkeyPressed;
+ dclInput.Shortcuts.Backpack.performed += OnBackpackHotkeyPressed;
+ dclInput.Shortcuts.Communities.performed += OnCommunitiesHotkeyPressed;
+ dclInput.Shortcuts.Places.performed += OnPlacesHotkeyPressed;
+ dclInput.Shortcuts.Events.performed += OnEventsHotkeyPressed;
+ dclInput.Shortcuts.CameraReel.performed += OnCameraReelHotkeyPressed;
+ }
+
+ private void OnCameraReelHotkeyPressed(InputAction.CallbackContext ctx)
+ {
+ if (!includeCameraReel) return;
+
+ if (lastShownSection != ExploreSections.CameraReel)
+ {
+ sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
+ ShowSection(ExploreSections.CameraReel);
+ }
+ else
+ isControlClosing = true;
+ }
+
+ private void OnCloseMainMenu(InputAction.CallbackContext obj)
+ {
+ // Search bar could be focused when closing the menu, so we need to remove the focus,
+ // which will also re-enable shortcuts
+ EventSystem.current.SetSelectedGameObject(null);
+
+ profileMenuController.HideViewAsync(CancellationToken.None).Forget();
+ isControlClosing = true;
+ }
+
+ private void OnMapHotkeyPressed(InputAction.CallbackContext obj)
+ {
+ if (lastShownSection != ExploreSections.Navmap)
+ {
+ sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
+ ShowSection(ExploreSections.Navmap);
+ }
+ else
+ isControlClosing = true;
+ }
+
+ private void OnSettingsHotkeyPressed(InputAction.CallbackContext obj)
+ {
+ if (lastShownSection != ExploreSections.Settings)
+ {
+ sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
+ ShowSection(ExploreSections.Settings);
+ }
+ else
+ isControlClosing = true;
+ }
+
+ private void OnCommunitiesHotkeyPressed(InputAction.CallbackContext obj)
+ {
+ if (!includeCommunities) return;
+
+ if (lastShownSection != ExploreSections.Communities)
+ {
+ sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
+ ShowSection(ExploreSections.Communities);
+ }
+ else
+ isControlClosing = true;
+ }
+
+ private void OnPlacesHotkeyPressed(InputAction.CallbackContext obj)
+ {
+ if (!includeDiscover) return;
+
+ if (lastShownSection != ExploreSections.Places)
+ {
+ sectionSelectorController.SetAnimationState(false, tabsBySections![lastShownSection]);
+ ShowSection(ExploreSections.Places);
+ }
+ else
+ isControlClosing = true;
+ }
+
+ private void OnEventsHotkeyPressed(InputAction.CallbackContext obj)
+ {
+ if (!includeDiscover) return;
+
+ if (lastShownSection != ExploreSections.Events)
+ {
+ sectionSelectorController.SetAnimationState(false, tabsBySections![lastShownSection]);
+ ShowSection(ExploreSections.Events);
+ }
+ else
+ isControlClosing = true;
+ }
+
+ private void OnBackpackHotkeyPressed(InputAction.CallbackContext obj)
+ {
+ if (lastShownSection != ExploreSections.Backpack)
+ {
+ sectionSelectorController.SetAnimationState(false, tabsBySections[lastShownSection]);
+ ShowSection(ExploreSections.Backpack);
+ }
+ else
+ isControlClosing = true;
+ }
+
+ private void ShowSection(ExploreSections section)
+ {
+ ToggleSection(true, tabsBySections[section], section, true);
+ }
+
+ protected override void OnViewClose()
+ {
+ foreach (ISection exploreSectionsValue in exploreSections.Values)
+ exploreSectionsValue.Deactivate();
+
+ if (profileMenuController.State is ControllerState.ViewFocused or ControllerState.ViewBlurred)
+ profileMenuController.HideViewAsync(CancellationToken.None).Forget();
+
+ profileMenuCts.SafeCancelAndDispose();
+ checkForLiveEventsCts.SafeCancelAndDispose();
+
+ UnblockUnwantedInputs();
+ UnRegisterHotkeys();
+ }
+
+ private void UnRegisterHotkeys()
+ {
+ dclInput.Shortcuts.MainMenu.canceled -= OnCloseMainMenu;
+ dclInput.Shortcuts.Map.performed -= OnMapHotkeyPressed;
+ dclInput.Shortcuts.Settings.performed -= OnSettingsHotkeyPressed;
+ dclInput.Shortcuts.Backpack.performed -= OnBackpackHotkeyPressed;
+ dclInput.Shortcuts.Communities.performed -= OnCommunitiesHotkeyPressed;
+ dclInput.Shortcuts.Places.performed -= OnPlacesHotkeyPressed;
+ dclInput.Shortcuts.Events.performed -= OnEventsHotkeyPressed;
+ dclInput.Shortcuts.CameraReel.performed -= OnCameraReelHotkeyPressed;
+ }
+
+ private void BlockUnwantedInputs()
+ {
+ inputBlock.Disable(InputMapComponent.Kind.Camera, InputMapComponent.Kind.Player);
+ }
+
+ private void UnblockUnwantedInputs()
+ {
+ inputBlock.Enable(InputMapComponent.Kind.Camera, InputMapComponent.Kind.Player);
+ }
+
+ protected override async UniTask WaitForCloseIntentAsync(CancellationToken ct)
+ {
+ await UniTask.WhenAny(viewInstance!.CloseButton.OnClickAsync(ct),
+ UniTask.WaitUntil(() => isControlClosing, PlayerLoopTiming.Update, ct),
+ viewInstance.ProfileMenuView.SystemMenuView.LogoutButton.OnClickAsync(ct));
+ }
+
+ private async void ShowProfileMenuAsync()
+ {
+ profileMenuCts = profileMenuCts.SafeRestart();
+
+ if (profileMenuController.State != ControllerState.ViewHidden)
+ return;
+
+ try
+ {
+ viewInstance!.ProfileMenuCloserButton.gameObject.SetActive(true);
+ viewInstance.ProfileMenuCloserButton.onClick.AddListener(OnProfileMenuCloserClicked);
+
+ await profileMenuController.LaunchViewLifeCycleAsync(new CanvasOrdering(CanvasOrdering.SortingLayer.Popup, 0), new ControllerNoData(), profileMenuCts.Token);
+ await profileMenuController.HideViewAsync(CancellationToken.None);
+ }
+ catch (OperationCanceledException)
+ {
+ // Cancellations ignored
+ }
+ finally
+ {
+ if (viewInstance != null)
+ {
+ viewInstance.ProfileMenuCloserButton.onClick.RemoveListener(OnProfileMenuCloserClicked);
+ viewInstance.ProfileMenuCloserButton.gameObject.SetActive(false);
+ }
+ }
+ }
+
+ private void OnProfileMenuCloserClicked() =>
+ profileMenuCts?.Cancel();
+
+ private async UniTaskVoid FillLiveEventsAsync(CancellationToken ct)
+ {
+ Result> liveEventsResult = await eventsApiService.GetEventsAsync(ct, onlyLiveEvents: true).SuppressToResultAsync(ReportCategory.EVENTS);
+
+ if (ct.IsCancellationRequested)
+ return;
+
+ viewInstance!.SetLiveEventsCounter(liveEventsResult.Success ? liveEventsResult.Value.Count : 0);
+ }
+ }
+
+ public readonly struct ExplorePanelParameter
+ {
+ public readonly ExploreSections Section;
+ public readonly BackpackSections? BackpackSection;
+ public readonly SettingsController.SettingsSection? SettingsSection;
+
+ ///
+ /// Whether a specific section has to be opened when the explore panel is shown or not (using the default one).
+ ///
+ public readonly bool IsSectionProvided;
+
+ public ExplorePanelParameter(ExploreSections section, BackpackSections? backpackSection = null, SettingsController.SettingsSection? settingsSection = null)
+ {
+ Section = section;
+ BackpackSection = backpackSection;
+ SettingsSection = settingsSection;
+ IsSectionProvided = true;
+ }
+ }
+}
diff --git a/Explorer/Assets/DCL/ExternalUrlPrompt/ExternalUrlPromptController.cs b/Explorer/Assets/DCL/ExternalUrlPrompt/ExternalUrlPromptController.cs
index c2b9f1304b2..38cde96a64e 100644
--- a/Explorer/Assets/DCL/ExternalUrlPrompt/ExternalUrlPromptController.cs
+++ b/Explorer/Assets/DCL/ExternalUrlPrompt/ExternalUrlPromptController.cs
@@ -10,7 +10,7 @@ namespace DCL.ExternalUrlPrompt
{
public partial class ExternalUrlPromptController : ControllerBase
{
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
private readonly UnityAppWebBrowser webBrowser;
private readonly ICursor cursor;
diff --git a/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs b/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs
index bba947798b3..f91e3a94b21 100644
--- a/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs
+++ b/Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs
@@ -98,6 +98,7 @@ public static class Endpoints
public enum FeatureFlag
{
+
None = 0,
MultiplayerCompressionWin,
MultiplayerCompressionMac,
diff --git a/Explorer/Assets/DCL/FeatureFlags/FeaturesRegistry.cs b/Explorer/Assets/DCL/FeatureFlags/FeaturesRegistry.cs
index 89efd221440..11398e8a3d1 100644
--- a/Explorer/Assets/DCL/FeatureFlags/FeaturesRegistry.cs
+++ b/Explorer/Assets/DCL/FeatureFlags/FeaturesRegistry.cs
@@ -31,55 +31,55 @@ public FeaturesRegistry(
SetFeatureStates(new Dictionary
{
- [FeatureId.CAMERA_REEL] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.CAMERA_REEL, featureFlags.IsEnabled(FeatureFlagsStrings.CAMERA_REEL) || isEditor),
- [FeatureId.FRIENDS] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.FRIENDS, featureFlags.IsEnabled(FeatureFlagsStrings.FRIENDS) || isEditor) && !localSceneDevelopment,
- [FeatureId.FRIENDS_USER_BLOCKING] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.FRIENDS_USER_BLOCKING, featureFlags.IsEnabled(FeatureFlagsStrings.FRIENDS_USER_BLOCKING)),
- [FeatureId.FRIENDS_ONLINE_STATUS] = appArgs.HasFlag(AppArgsFlags.FRIENDS_ONLINE_STATUS) || featureFlags.IsEnabled(FeatureFlagsStrings.FRIENDS_ONLINE_STATUS),
- [FeatureId.PROFILE_NAME_EDITOR] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.PROFILE_NAME_EDITOR, featureFlags.IsEnabled(FeatureFlagsStrings.PROFILE_NAME_EDITOR) || Application.isEditor),
- [FeatureId.LOCAL_SCENE_DEVELOPMENT] = localSceneDevelopment,
- [FeatureId.CHAT_MESSAGE_RATE_LIMIT] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.CHAT_MESSAGE_RATE_LIMIT, featureFlags.IsEnabled(FeatureFlagsStrings.CHAT_MESSAGE_RATE_LIMIT)),
- [FeatureId.CHAT_MESSAGE_BUFFER] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.CHAT_MESSAGE_BUFFER, featureFlags.IsEnabled(FeatureFlagsStrings.CHAT_MESSAGE_BUFFER_CONFIG)),
- [FeatureId.MARKETPLACE_CREDITS] = featureFlags.IsEnabled(FeatureFlagsStrings.MARKETPLACE_CREDITS),
- [FeatureId.USER_CREDITS] = featureFlags.IsEnabled(FeatureFlagsStrings.USER_CREDITS),
- [FeatureId.CREDITS_WEARABLE_PURCHASE] = featureFlags.IsEnabled(FeatureFlagsStrings.CREDITS_WEARABLE_PURCHASE),
- [FeatureId.CREDITS_TOPUP] = featureFlags.IsEnabled(FeatureFlagsStrings.CREDITS_TOPUP),
- [FeatureId.HEAD_SYNC] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.HEAD_SYNC, featureFlags.IsEnabled(FeatureFlagsStrings.HEAD_SYNC) || isEditor),
- [FeatureId.STOP_ON_DUPLICATE_IDENTITY] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.STOP_ON_DUPLICATE_IDENTITY, featureFlags.IsEnabled(FeatureFlagsStrings.STOP_ON_DUPLICATE_IDENTITY)),
- [FeatureId.PRIVATE_CHAT_REQUIRES_TOPIC] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.PRIVATE_CHAT_REQUIRES_TOPIC, featureFlags.IsEnabled(FeatureFlagsStrings.PRIVATE_CHAT_REQUIRES_TOPIC)),
- [FeatureId.DONATIONS] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.DONATIONS_UI, featureFlags.IsEnabled(FeatureFlagsStrings.DONATIONS)),
- [FeatureId.FORCE_BACKFACE_CULLING] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.FORCE_BACKFACE_CULLING, featureFlags.IsEnabled(FeatureFlagsStrings.FORCE_BACKFACE_CULLING), requireDebug: false),
- [FeatureId.NAME_COLOR_CHANGE] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.NAME_COLOR_CHANGE, featureFlags.IsEnabled(FeatureFlagsStrings.NAME_COLOR_CHANGE) || isEditor),
- [FeatureId.CHAT_TRANSLATIONS] = featureFlags.IsEnabled(FeatureFlagsStrings.CHAT_TRANSLATION_ENABLED),
- [FeatureId.GIFTING_ENABLED] = featureFlags.IsEnabled(FeatureFlagsStrings.GIFTING_ENABLED),
- [FeatureId.BANNED_USERS_FROM_SCENE] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.BANNED_USERS_FROM_SCENE, featureFlags.IsEnabled(FeatureFlagsStrings.BANNED_USERS_FROM_SCENE) || isEditor),
- [FeatureId.BACKPACK_OUTFITS] = featureFlags.IsEnabled(FeatureFlagsStrings.OUTFITS_ENABLED),
- [FeatureId.DISCOVER] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.DISCOVER, featureFlags.IsEnabled(FeatureFlagsStrings.DISCOVER) || isEditor),
- [FeatureId.FRIENDS_CONNECTIVITY_STATUS] = appArgs.HasFlag(AppArgsFlags.FRIENDS_ONLINE_STATUS) || featureFlags.IsEnabled(FeatureFlagsStrings.FRIENDS_ONLINE_STATUS),
- [FeatureId.COMMUNITIES_ANNOUNCEMENTS] = featureFlags.IsEnabled(FeatureFlagsStrings.COMMUNITIES_ANNOUNCEMENTS) || (appArgs.HasDebugFlag() && appArgs.HasFlag(AppArgsFlags.COMMUNITIES_ANNOUNCEMENTS)) || isEditor,
- [FeatureId.COMMUNITIES_MEMBERS_COUNTER] = featureFlags.IsEnabled(FeatureFlagsStrings.COMMUNITIES_MEMBERS_COUNTER),
- [FeatureId.EMAIL_OTP_AUTH] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.EMAIL_OTP_AUTH, featureFlags.IsEnabled(FeatureFlagsStrings.EMAIL_OTP_AUTH)),
- [FeatureId.CHECK_DISK_SPACE] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.CHECK_DISK_SPACE, featureFlags.IsEnabled(FeatureFlagsStrings.CHECK_DISK_SPACE)),
- [FeatureId.AVATAR_HIGHLIGHT] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.AVATAR_HIGHLIGHT, featureFlags.IsEnabled(FeatureFlagsStrings.AVATAR_HIGHLIGHT) || isEditor, requireDebug: false),
- [FeatureId.DOUBLE_JUMP] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.DOUBLE_JUMP, featureFlags.IsEnabled(FeatureFlagsStrings.DOUBLE_JUMP) || Application.isEditor),
- [FeatureId.GLIDING] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.GLIDING, featureFlags.IsEnabled(FeatureFlagsStrings.GLIDING) || Application.isEditor),
- [FeatureId.SELF_PREVIEW_BUILDER_COLLECTIONS] = appArgs.HasFlag(AppArgsFlags.SELF_PREVIEW_BUILDER_COLLECTIONS),
- [FeatureId.AVATAR_GHOSTS] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.AVATAR_GHOSTS, featureFlags.IsEnabled(FeatureFlagsStrings.AVATAR_GHOSTS)),
- [FeatureId.REPORT_USER] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.REPORT_USER, featureFlags.IsEnabled(FeatureFlagsStrings.REPORT_USER) || Application.isEditor),
- [FeatureId.POINT_AT] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.POINT_AT, featureFlags.IsEnabled(FeatureFlagsStrings.POINT_AT) || Application.isEditor),
- [FeatureId.AVATAR_CONTEXT_MENU] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.AVATAR_CONTEXT_MENU, featureFlags.IsEnabled(FeatureFlagsStrings.AVATAR_CONTEXT_MENU) || Application.isEditor),
- [FeatureId.DOUBLE_CLICK_WALK] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.DOUBLE_CLICK_WALK, featureFlags.IsEnabled(FeatureFlagsStrings.DOUBLE_CLICK_WALK)),
- [FeatureId.PULSE] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.PULSE_MULTIPLAYER, featureFlags.IsEnabled(FeatureFlagsStrings.PULSE), requireDebug: false) && !localSceneDevelopment,
- [FeatureId.AB_DEPS_DIGEST_CACHE_KEY] = featureFlags.IsEnabled(FeatureFlagsStrings.AB_DEPS_DIGEST_CACHE_KEY),
- [FeatureId.BYTE_WEIGHTED_LOADING_PROGRESS] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.BYTE_WEIGHTED_LOADING_PROGRESS, featureFlags.IsEnabled(FeatureFlagsStrings.BYTE_WEIGHTED_LOADING_PROGRESS) || isEditor),
- [FeatureId.HARDWARE_FINGERPRINT] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.HARDWARE_FINGERPRINT, featureFlags.IsEnabled(FeatureFlagsStrings.HARDWARE_FINGERPRINT)),
- [FeatureId.MCP_SERVER] = appArgs.HasFlag(AppArgsFlags.MCP) || appArgs.HasFlag(AppArgsFlags.MCP_PORT),
+ [FeatureId.CameraReel] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.CAMERA_REEL, featureFlags.IsEnabled(FeatureFlagsStrings.CAMERA_REEL) || isEditor),
+ [FeatureId.Friends] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.FRIENDS, featureFlags.IsEnabled(FeatureFlagsStrings.FRIENDS) || isEditor) && !localSceneDevelopment,
+ [FeatureId.FriendsUserBlocking] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.FRIENDS_USER_BLOCKING, featureFlags.IsEnabled(FeatureFlagsStrings.FRIENDS_USER_BLOCKING)),
+ [FeatureId.FriendsOnlineStatus] = appArgs.HasFlag(AppArgsFlags.FRIENDS_ONLINE_STATUS) || featureFlags.IsEnabled(FeatureFlagsStrings.FRIENDS_ONLINE_STATUS),
+ [FeatureId.ProfileNameEditor] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.PROFILE_NAME_EDITOR, featureFlags.IsEnabled(FeatureFlagsStrings.PROFILE_NAME_EDITOR) || Application.isEditor),
+ [FeatureId.LocalSceneDevelopment] = localSceneDevelopment,
+ [FeatureId.ChatMessageRateLimit] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.CHAT_MESSAGE_RATE_LIMIT, featureFlags.IsEnabled(FeatureFlagsStrings.CHAT_MESSAGE_RATE_LIMIT)),
+ [FeatureId.ChatMessageBuffer] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.CHAT_MESSAGE_BUFFER, featureFlags.IsEnabled(FeatureFlagsStrings.CHAT_MESSAGE_BUFFER_CONFIG)),
+ [FeatureId.MarketplaceCredits] = featureFlags.IsEnabled(FeatureFlagsStrings.MARKETPLACE_CREDITS),
+ [FeatureId.UserCredits] = featureFlags.IsEnabled(FeatureFlagsStrings.USER_CREDITS),
+ [FeatureId.CreditsWearablePurchase] = featureFlags.IsEnabled(FeatureFlagsStrings.CREDITS_WEARABLE_PURCHASE),
+ [FeatureId.CreditsTopup] = featureFlags.IsEnabled(FeatureFlagsStrings.CREDITS_TOPUP),
+ [FeatureId.HeadSync] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.HEAD_SYNC, featureFlags.IsEnabled(FeatureFlagsStrings.HEAD_SYNC) || isEditor),
+ [FeatureId.StopOnDuplicateIdentity] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.STOP_ON_DUPLICATE_IDENTITY, featureFlags.IsEnabled(FeatureFlagsStrings.STOP_ON_DUPLICATE_IDENTITY)),
+ [FeatureId.PrivateChatRequiresTopic] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.PRIVATE_CHAT_REQUIRES_TOPIC, featureFlags.IsEnabled(FeatureFlagsStrings.PRIVATE_CHAT_REQUIRES_TOPIC)),
+ [FeatureId.Donations] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.DONATIONS_UI, featureFlags.IsEnabled(FeatureFlagsStrings.DONATIONS)),
+ [FeatureId.ForceBackfaceCulling] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.FORCE_BACKFACE_CULLING, featureFlags.IsEnabled(FeatureFlagsStrings.FORCE_BACKFACE_CULLING), requireDebug: false),
+ [FeatureId.NameColorChange] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.NAME_COLOR_CHANGE, featureFlags.IsEnabled(FeatureFlagsStrings.NAME_COLOR_CHANGE) || isEditor),
+ [FeatureId.ChatTranslations] = featureFlags.IsEnabled(FeatureFlagsStrings.CHAT_TRANSLATION_ENABLED),
+ [FeatureId.GiftingEnabled] = featureFlags.IsEnabled(FeatureFlagsStrings.GIFTING_ENABLED),
+ [FeatureId.BannedUsersFromScene] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.BANNED_USERS_FROM_SCENE, featureFlags.IsEnabled(FeatureFlagsStrings.BANNED_USERS_FROM_SCENE) || isEditor),
+ [FeatureId.BackpackOutfits] = featureFlags.IsEnabled(FeatureFlagsStrings.OUTFITS_ENABLED),
+ [FeatureId.Discover] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.DISCOVER, featureFlags.IsEnabled(FeatureFlagsStrings.DISCOVER) || isEditor),
+ [FeatureId.FriendsConnectivityStatus] = appArgs.HasFlag(AppArgsFlags.FRIENDS_ONLINE_STATUS) || featureFlags.IsEnabled(FeatureFlagsStrings.FRIENDS_ONLINE_STATUS),
+ [FeatureId.CommunitiesAnnouncements] = featureFlags.IsEnabled(FeatureFlagsStrings.COMMUNITIES_ANNOUNCEMENTS) || (appArgs.HasDebugFlag() && appArgs.HasFlag(AppArgsFlags.COMMUNITIES_ANNOUNCEMENTS)) || isEditor,
+ [FeatureId.CommunitiesMembersCounter] = featureFlags.IsEnabled(FeatureFlagsStrings.COMMUNITIES_MEMBERS_COUNTER),
+ [FeatureId.EmailOTPAuth] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.EMAIL_OTP_AUTH, featureFlags.IsEnabled(FeatureFlagsStrings.EMAIL_OTP_AUTH)),
+ [FeatureId.CheckDiskSpace] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.CHECK_DISK_SPACE, featureFlags.IsEnabled(FeatureFlagsStrings.CHECK_DISK_SPACE)),
+ [FeatureId.AvatarHighlight] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.AVATAR_HIGHLIGHT, featureFlags.IsEnabled(FeatureFlagsStrings.AVATAR_HIGHLIGHT) || isEditor, requireDebug: false),
+ [FeatureId.DoubleJump] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.DOUBLE_JUMP, featureFlags.IsEnabled(FeatureFlagsStrings.DOUBLE_JUMP) || Application.isEditor),
+ [FeatureId.Gliding] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.GLIDING, featureFlags.IsEnabled(FeatureFlagsStrings.GLIDING) || Application.isEditor),
+ [FeatureId.SelfPreviewBuilderCollections] = appArgs.HasFlag(AppArgsFlags.SELF_PREVIEW_BUILDER_COLLECTIONS),
+ [FeatureId.AvatarGhosts] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.AVATAR_GHOSTS, featureFlags.IsEnabled(FeatureFlagsStrings.AVATAR_GHOSTS)),
+ [FeatureId.ReportUser] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.REPORT_USER, featureFlags.IsEnabled(FeatureFlagsStrings.REPORT_USER) || Application.isEditor),
+ [FeatureId.PointAt] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.POINT_AT, featureFlags.IsEnabled(FeatureFlagsStrings.POINT_AT) || Application.isEditor),
+ [FeatureId.AvatarContextMenu] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.AVATAR_CONTEXT_MENU, featureFlags.IsEnabled(FeatureFlagsStrings.AVATAR_CONTEXT_MENU) || Application.isEditor),
+ [FeatureId.DoubleClickWalk] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.DOUBLE_CLICK_WALK, featureFlags.IsEnabled(FeatureFlagsStrings.DOUBLE_CLICK_WALK)),
+ [FeatureId.Pulse] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.PULSE_MULTIPLAYER, featureFlags.IsEnabled(FeatureFlagsStrings.PULSE), requireDebug: false) && !localSceneDevelopment,
+ [FeatureId.ABDepsDigestCacheKey] = featureFlags.IsEnabled(FeatureFlagsStrings.AB_DEPS_DIGEST_CACHE_KEY),
+ [FeatureId.ByteWeightedLoadingProgress] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.BYTE_WEIGHTED_LOADING_PROGRESS, featureFlags.IsEnabled(FeatureFlagsStrings.BYTE_WEIGHTED_LOADING_PROGRESS) || isEditor),
+ [FeatureId.HardwareFingerprint] = appArgs.ResolveFeatureFlagArg(AppArgsFlags.HARDWARE_FINGERPRINT, featureFlags.IsEnabled(FeatureFlagsStrings.HARDWARE_FINGERPRINT)),
+ [FeatureId.McpServer] = appArgs.HasFlag(AppArgsFlags.MCP) || appArgs.HasFlag(AppArgsFlags.MCP_PORT),
// Note: COMMUNITIES feature is not cached here because it depends on user identity
});
//We need to set FRIENDS AND USER BLOCKING before setting VOICE CHAT that depends on them.
- SetFeatureState(FeatureId.VOICE_CHAT, IsEnabled(FeatureId.FRIENDS) && IsEnabled(FeatureId.FRIENDS_USER_BLOCKING) && (isEditor || featureFlags.IsEnabled(FeatureFlagsStrings.VOICE_CHAT) || (appArgs.HasDebugFlag() && appArgs.HasFlag(AppArgsFlags.VOICE_CHAT))));
- SetFeatureState(FeatureId.COMMUNITY_VOICE_CHAT, IsEnabled(FeatureId.VOICE_CHAT));
- SetFeatureState(FeatureId.NEARBY_VOICE_CHAT, IsEnabled(FeatureId.VOICE_CHAT) && appArgs.ResolveFeatureFlagArg(AppArgsFlags.NEARBY_VOICE_CHAT, featureFlags.IsEnabled(FeatureFlagsStrings.NEARBY_VOICE_CHAT) || Application.isEditor));
+ SetFeatureState(FeatureId.VoiceChat, IsEnabled(FeatureId.Friends) && IsEnabled(FeatureId.FriendsUserBlocking) && (isEditor || featureFlags.IsEnabled(FeatureFlagsStrings.VOICE_CHAT) || (appArgs.HasDebugFlag() && appArgs.HasFlag(AppArgsFlags.VOICE_CHAT))));
+ SetFeatureState(FeatureId.CommunityVoiceChat, IsEnabled(FeatureId.VoiceChat));
+ SetFeatureState(FeatureId.NearbyVoiceChat, IsEnabled(FeatureId.VoiceChat) && appArgs.ResolveFeatureFlagArg(AppArgsFlags.NEARBY_VOICE_CHAT, featureFlags.IsEnabled(FeatureFlagsStrings.NEARBY_VOICE_CHAT) || Application.isEditor));
}
///
@@ -140,76 +140,76 @@ public enum FeatureId
{
// Numbered because we use these to selectively enable settings,
// this way we avoid breaking that if we ever change the order here.
- NONE = 0,
- VOICE_CHAT = 1,
- COMMUNITY_VOICE_CHAT = 2,
- FRIENDS = 3,
- FRIENDS_USER_BLOCKING = 4,
- FRIENDS_ONLINE_STATUS = 5,
- PROFILE_NAME_EDITOR = 6,
- LOCAL_SCENE_DEVELOPMENT = 7,
- CAMERA_REEL = 8,
- MULTIPLAYER_COMPRESSION_WIN = 9,
- MULTIPLAYER_COMPRESSION_MAC = 10,
- PORTABLE_EXPERIENCE = 11,
- GLOBAL_PORTABLE_EXPERIENCE = 12,
- PORTABLE_EXPERIENCE_CHAT_COMMANDS = 13,
- MAP_PINS = 14,
- CUSTOM_MAP_PINS_ICONS = 15,
- USER_ALLOW_LIST = 16,
- CSV_VARIANT = 17,
- STRING_VARIANT = 18,
- WALLETS_VARIANT = 19,
- ONBOARDING = 20,
- GREETING_ONBOARDING = 21,
- ONBOARDING_ENABLED_VARIANT = 22,
- ONBOARDING_GREETINGS_VARIANT = 23,
- GENESIS_STARTING_PARCEL = 24,
- VIDEO_PRIORITIZATION = 25,
- ASSET_BUNDLE_FALLBACK = 26,
- CHAT_HISTORY_LOCAL_STORAGE = 27,
- SCENE_MEMORY_LIMIT = 28,
- KTX2_CONVERSION = 29,
- MARKETPLACE_CREDITS = 30,
- MARKETPLACE_CREDITS_WALLETS_VARIANT = 31,
- COMMUNITIES = 32,
- COMMUNITIES_MEMBERS_COUNTER = 33,
- AUTH_CODE_VALIDATION = 34,
- GPUI_ENABLED = 35,
- GIFTING_ENABLED = 36,
- CHAT_MESSAGE_RATE_LIMIT = 37,
- CHAT_MESSAGE_BUFFER = 38,
- HEAD_SYNC = 39,
- STOP_ON_DUPLICATE_IDENTITY = 40,
- PRIVATE_CHAT_REQUIRES_TOPIC = 41,
- DONATIONS = 42,
- FORCE_BACKFACE_CULLING = 43,
- NAME_COLOR_CHANGE = 44,
- EMAIL_OTP_AUTH = 45,
- CHECK_DISK_SPACE = 46,
- DISCOVER = 47,
- AVATAR_HIGHLIGHT = 48,
- DOUBLE_JUMP = 49,
- GLIDING = 50,
- AVATAR_GHOSTS = 51,
- REPORT_USER = 52,
- POINT_AT = 53,
- CHAT_TRANSLATIONS = 54,
- BANNED_USERS_FROM_SCENE = 55,
- BACKPACK_OUTFITS = 56,
- FRIENDS_CONNECTIVITY_STATUS = 57,
- COMMUNITIES_ANNOUNCEMENTS = 58,
- SELF_PREVIEW_BUILDER_COLLECTIONS = 59,
- AVATAR_CONTEXT_MENU = 60,
- DOUBLE_CLICK_WALK = 61,
- NEARBY_VOICE_CHAT = 62,
- AB_DEPS_DIGEST_CACHE_KEY = 63,
- BYTE_WEIGHTED_LOADING_PROGRESS = 64,
- PULSE = 65,
- HARDWARE_FINGERPRINT = 66,
- USER_CREDITS = 67,
- CREDITS_WEARABLE_PURCHASE = 68,
- CREDITS_TOPUP = 69,
- MCP_SERVER = 70,
+ None = 0,
+ VoiceChat = 1,
+ CommunityVoiceChat = 2,
+ Friends = 3,
+ FriendsUserBlocking = 4,
+ FriendsOnlineStatus = 5,
+ ProfileNameEditor = 6,
+ LocalSceneDevelopment = 7,
+ CameraReel = 8,
+ MultiplayerCompressionWin = 9,
+ MultiplayerCompressionMac = 10,
+ PortableExperience = 11,
+ GlobalPortableExperience = 12,
+ PortableExperienceChatCommands = 13,
+ MapPins = 14,
+ CustomMapPinsIcons = 15,
+ UserAllowList = 16,
+ CsvVariant = 17,
+ StringVariant = 18,
+ WalletsVariant = 19,
+ Onboarding = 20,
+ GreetingOnboarding = 21,
+ OnboardingEnabledVariant = 22,
+ OnboardingGreetingsVariant = 23,
+ GenesisStartingParcel = 24,
+ VideoPrioritization = 25,
+ AssetBundleFallback = 26,
+ ChatHistoryLocalStorage = 27,
+ SceneMemoryLimit = 28,
+ KTX2Conversion = 29,
+ MarketplaceCredits = 30,
+ MarketplaceCreditsWalletsVariant = 31,
+ Communities = 32,
+ CommunitiesMembersCounter = 33,
+ AuthCodeValidation = 34,
+ GpuiEnabled = 35,
+ GiftingEnabled = 36,
+ ChatMessageRateLimit = 37,
+ ChatMessageBuffer = 38,
+ HeadSync = 39,
+ StopOnDuplicateIdentity = 40,
+ PrivateChatRequiresTopic = 41,
+ Donations = 42,
+ ForceBackfaceCulling = 43,
+ NameColorChange = 44,
+ EmailOTPAuth = 45,
+ CheckDiskSpace = 46,
+ Discover = 47,
+ AvatarHighlight = 48,
+ DoubleJump = 49,
+ Gliding = 50,
+ AvatarGhosts = 51,
+ ReportUser = 52,
+ PointAt = 53,
+ ChatTranslations = 54,
+ BannedUsersFromScene = 55,
+ BackpackOutfits = 56,
+ FriendsConnectivityStatus = 57,
+ CommunitiesAnnouncements = 58,
+ SelfPreviewBuilderCollections = 59,
+ AvatarContextMenu = 60,
+ DoubleClickWalk = 61,
+ NearbyVoiceChat = 62,
+ ABDepsDigestCacheKey = 63,
+ ByteWeightedLoadingProgress = 64,
+ Pulse = 65,
+ HardwareFingerprint = 66,
+ UserCredits = 67,
+ CreditsWearablePurchase = 68,
+ CreditsTopup = 69,
+ McpServer = 70,
}
}
diff --git a/Explorer/Assets/DCL/Friends/FriendsConnectivityStatusTracker.cs b/Explorer/Assets/DCL/Friends/FriendsConnectivityStatusTracker.cs
index a726ceca536..64388a17568 100644
--- a/Explorer/Assets/DCL/Friends/FriendsConnectivityStatusTracker.cs
+++ b/Explorer/Assets/DCL/Friends/FriendsConnectivityStatusTracker.cs
@@ -85,7 +85,7 @@ private void FriendRemoved(string userid)
}
public OnlineStatus GetFriendStatus(string friendAddress) =>
- friendsOnlineStatus.GetValueOrDefault(friendAddress, OnlineStatus.OFFLINE);
+ friendsOnlineStatus.GetValueOrDefault(friendAddress, OnlineStatus.Offline);
private bool FriendOnlineStatusChanged(Profile.CompactInfo friendProfile, OnlineStatus onlineStatus)
{
@@ -97,13 +97,13 @@ private bool FriendOnlineStatusChanged(Profile.CompactInfo friendProfile, Online
}
private void FriendBecameOnline(Profile.CompactInfo friendProfile) =>
- DebounceStatusChange(friendProfile, OnlineStatus.ONLINE, () => OnFriendBecameOnline?.Invoke(friendProfile));
+ DebounceStatusChange(friendProfile, OnlineStatus.Online, () => OnFriendBecameOnline?.Invoke(friendProfile));
private void FriendBecameAway(Profile.CompactInfo friendProfile) =>
- DebounceStatusChange(friendProfile, OnlineStatus.AWAY, () => OnFriendBecameAway?.Invoke(friendProfile));
+ DebounceStatusChange(friendProfile, OnlineStatus.Away, () => OnFriendBecameAway?.Invoke(friendProfile));
private void FriendBecameOffline(Profile.CompactInfo friendProfile) =>
- DebounceStatusChange(friendProfile, OnlineStatus.OFFLINE, () => OnFriendBecameOffline?.Invoke(friendProfile));
+ DebounceStatusChange(friendProfile, OnlineStatus.Offline, () => OnFriendBecameOffline?.Invoke(friendProfile));
private void DebounceStatusChange(Profile.CompactInfo friendProfile, OnlineStatus newStatus, Action onStatusChange)
{
diff --git a/Explorer/Assets/DCL/Friends/FriendshipStatus.cs b/Explorer/Assets/DCL/Friends/FriendshipStatus.cs
index 266ca0f0d8a..9a3dbd0151d 100644
--- a/Explorer/Assets/DCL/Friends/FriendshipStatus.cs
+++ b/Explorer/Assets/DCL/Friends/FriendshipStatus.cs
@@ -2,11 +2,11 @@ namespace DCL.Friends
{
public enum FriendshipStatus
{
- NONE,
- FRIEND,
- REQUEST_SENT,
- REQUEST_RECEIVED,
- BLOCKED,
- BLOCKED_BY,
+ None,
+ Friend,
+ RequestSent,
+ RequestReceived,
+ Blocked,
+ BlockedBy,
}
}
diff --git a/Explorer/Assets/DCL/Friends/RPCFriendsService.cs b/Explorer/Assets/DCL/Friends/RPCFriendsService.cs
index 571b37b4c98..2aa73905317 100644
--- a/Explorer/Assets/DCL/Friends/RPCFriendsService.cs
+++ b/Explorer/Assets/DCL/Friends/RPCFriendsService.cs
@@ -341,21 +341,21 @@ public async UniTask GetFriendshipStatusAsync(string userId, C
switch (response.Accepted.Status)
{
case Decentraland.SocialService.V2.FriendshipStatus.Accepted:
- return FriendshipStatus.FRIEND;
+ return FriendshipStatus.Friend;
case Decentraland.SocialService.V2.FriendshipStatus.Blocked:
- return FriendshipStatus.BLOCKED;
+ return FriendshipStatus.Blocked;
case Decentraland.SocialService.V2.FriendshipStatus.RequestReceived:
- return FriendshipStatus.REQUEST_RECEIVED;
+ return FriendshipStatus.RequestReceived;
case Decentraland.SocialService.V2.FriendshipStatus.RequestSent:
- return FriendshipStatus.REQUEST_SENT;
+ return FriendshipStatus.RequestSent;
case Decentraland.SocialService.V2.FriendshipStatus.BlockedBy:
- return FriendshipStatus.BLOCKED_BY;
+ return FriendshipStatus.BlockedBy;
}
break;
}
- return FriendshipStatus.NONE;
+ return FriendshipStatus.None;
}
public async UniTask GetReceivedFriendRequestsAsync(int pageNum, int pageSize,
diff --git a/Explorer/Assets/DCL/Friends/Tests/FriendsConnectivityStatusTrackerShould.cs b/Explorer/Assets/DCL/Friends/Tests/FriendsConnectivityStatusTrackerShould.cs
index 784100b0cc5..4d2e3b5cb4a 100644
--- a/Explorer/Assets/DCL/Friends/Tests/FriendsConnectivityStatusTrackerShould.cs
+++ b/Explorer/Assets/DCL/Friends/Tests/FriendsConnectivityStatusTrackerShould.cs
@@ -57,7 +57,7 @@ public async Task RaiseOnlineEventWhenSameStatusIsRebroadcastAfterReset()
//Assert
Assert.AreEqual(2, onlineEventsCount);
- Assert.AreEqual(OnlineStatus.ONLINE, tracker.GetFriendStatus(friendProfile.UserId));
+ Assert.AreEqual(OnlineStatus.Online, tracker.GetFriendStatus(friendProfile.UserId));
}
[Test]
@@ -67,13 +67,13 @@ public async Task ReportFriendAsOfflineAfterReset()
var friendProfile = new Profile.CompactInfo(FRIEND_ID, "TestFriend");
eventBus.BroadcastFriendConnected(friendProfile);
await UniTask.Delay(DEBOUNCE_WAIT_MS);
- Assert.AreEqual(OnlineStatus.ONLINE, tracker.GetFriendStatus(friendProfile.UserId));
+ Assert.AreEqual(OnlineStatus.Online, tracker.GetFriendStatus(friendProfile.UserId));
//Act
tracker.Reset();
//Assert
- Assert.AreEqual(OnlineStatus.OFFLINE, tracker.GetFriendStatus(friendProfile.UserId));
+ Assert.AreEqual(OnlineStatus.Offline, tracker.GetFriendStatus(friendProfile.UserId));
}
[Test]
@@ -91,7 +91,7 @@ public async Task CancelPendingDebounceOnReset()
//Assert
Assert.AreEqual(0, onlineEventsCount);
- Assert.AreEqual(OnlineStatus.OFFLINE, tracker.GetFriendStatus(friendProfile.UserId));
+ Assert.AreEqual(OnlineStatus.Offline, tracker.GetFriendStatus(friendProfile.UserId));
}
}
}
diff --git a/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptController.cs b/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptController.cs
index 6abe8f0e74f..08c188f018a 100644
--- a/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptController.cs
@@ -21,7 +21,7 @@ public class BlockUserPromptController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
public BlockUserPromptController(ViewFactoryMethod viewFactory,
IFriendsService friendsService)
diff --git a/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptParams.cs b/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptParams.cs
index cef668ad062..13a787f8b0a 100644
--- a/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptParams.cs
+++ b/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptParams.cs
@@ -17,8 +17,8 @@ public BlockUserPromptParams(Web3Address targetUserId, string targetUserName, Us
public enum UserBlockAction
{
- BLOCK,
- UNBLOCK
+ Block,
+ Unblock
}
}
}
diff --git a/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptView.cs b/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptView.cs
index 7dfaf05f385..a19a704b5d0 100644
--- a/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptView.cs
+++ b/Explorer/Assets/DCL/Friends/UI/BlockUserPrompt/BlockUserPromptView.cs
@@ -23,13 +23,13 @@ public class BlockUserPromptView : ViewBase, IView
internal void SetTitle(BlockUserPromptParams.UserBlockAction blockAction, string userName)
{
- string format = blockAction == BlockUserPromptParams.UserBlockAction.BLOCK ? TITLE_BLOCK_FORMAT : TITLE_UNBLOCK_FORMAT;
+ string format = blockAction == BlockUserPromptParams.UserBlockAction.Block ? TITLE_BLOCK_FORMAT : TITLE_UNBLOCK_FORMAT;
TitleText.text = string.Format(format, userName);
}
internal void ConfigureButtons(BlockUserPromptParams.UserBlockAction blockAction)
{
- bool isBlock = blockAction == BlockUserPromptParams.UserBlockAction.BLOCK;
+ bool isBlock = blockAction == BlockUserPromptParams.UserBlockAction.Block;
BlockButton.gameObject.SetActive(isBlock);
BlockImage.gameObject.SetActive(isBlock);
BlockText.gameObject.SetActive(isBlock);
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/FriendsPanelController.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/FriendsPanelController.cs
index 2b38c7fbb7e..548aa52ff37 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/FriendsPanelController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/FriendsPanelController.cs
@@ -26,9 +26,9 @@ public class FriendsPanelController : ControllerBase CanvasOrdering.SortingLayer.FULLSCREEN;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Fullscreen;
public event Action? FriendsPanelOpened;
public event Action? OnlineFriendClicked;
@@ -69,7 +69,7 @@ public FriendsPanelController(ViewFactoryMethod viewFactory,
{
this.sidebarRequestNotificationIndicator = sidebarRequestNotificationIndicator;
- bool isConnectivityStatusEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.FRIENDS_CONNECTIVITY_STATUS);
+ bool isConnectivityStatusEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.FriendsConnectivityStatus);
if (isConnectivityStatusEnabled)
{
friendSectionControllerConnectivity = new FriendsSectionDoubleCollectionController(
@@ -110,7 +110,7 @@ public FriendsPanelController(ViewFactoryMethod viewFactory,
mvcManager,
new RequestsRequestManager(friendsService, friendEventBus, profileDataProvider, FRIENDS_REQUEST_PAGE_SIZE, instantiatedView.RequestsSection.LoopList),
passportBridge,
- FeaturesRegistry.Instance.IsEnabled(FeatureId.FRIENDS_USER_BLOCKING),
+ FeaturesRegistry.Instance.IsEnabled(FeatureId.FriendsUserBlocking),
webBrowser,
decentralandUrlsSource,
selfProfile);
@@ -189,25 +189,25 @@ protected override void OnViewInstantiated()
viewInstance.CloseButton.onClick.AddListener(CloseFriendsPanel);
viewInstance.BackgroundCloseButton.onClick.AddListener(CloseFriendsPanel);
- bool isUserBlockingFeatureEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.FRIENDS_USER_BLOCKING);
+ bool isUserBlockingFeatureEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.FriendsUserBlocking);
viewInstance.BlockedTabButton.gameObject.SetActive(isUserBlockingFeatureEnabled);
- ToggleTabs(FriendsPanelTab.FRIENDS);
+ ToggleTabs(FriendsPanelTab.Friends);
}
- private void OnFriendsTabButtonClicked() => ToggleTabs(FriendsPanelTab.FRIENDS);
- private void OnRequestsTabButtonClicked() => ToggleTabs(FriendsPanelTab.REQUESTS);
- private void OnBlockedTabButtonClicked() => ToggleTabs(FriendsPanelTab.BLOCKED);
+ private void OnFriendsTabButtonClicked() => ToggleTabs(FriendsPanelTab.Friends);
+ private void OnRequestsTabButtonClicked() => ToggleTabs(FriendsPanelTab.Requests);
+ private void OnBlockedTabButtonClicked() => ToggleTabs(FriendsPanelTab.Blocked);
public void CloseFriendsPanel() => closeTaskCompletionSource.TrySetResult();
private void FriendRequestCountChanged(int count) => sidebarRequestNotificationIndicator.SetNotificationCount(count);
internal void ToggleTabs(FriendsPanelTab tab)
{
- viewInstance!.FriendsTabSelected.SetActive(tab == FriendsPanelTab.FRIENDS);
- viewInstance.FriendsSection.SetActive(tab == FriendsPanelTab.FRIENDS);
- viewInstance.RequestsTabSelected.SetActive(tab == FriendsPanelTab.REQUESTS);
- viewInstance.RequestsSection.SetActive(tab == FriendsPanelTab.REQUESTS);
- viewInstance.BlockedTabSelected.SetActive(tab == FriendsPanelTab.BLOCKED);
- viewInstance.BlockedSection.SetActive(tab == FriendsPanelTab.BLOCKED);
+ viewInstance!.FriendsTabSelected.SetActive(tab == FriendsPanelTab.Friends);
+ viewInstance.FriendsSection.SetActive(tab == FriendsPanelTab.Friends);
+ viewInstance.RequestsTabSelected.SetActive(tab == FriendsPanelTab.Requests);
+ viewInstance.RequestsSection.SetActive(tab == FriendsPanelTab.Requests);
+ viewInstance.BlockedTabSelected.SetActive(tab == FriendsPanelTab.Blocked);
+ viewInstance.BlockedSection.SetActive(tab == FriendsPanelTab.Blocked);
}
protected override async UniTask WaitForCloseIntentAsync(CancellationToken ct) =>
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/PersistentFriendPanelOpenerController.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/PersistentFriendPanelOpenerController.cs
index 34f5a2d8bbd..b027d437f16 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/PersistentFriendPanelOpenerController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/PersistentFriendPanelOpenerController.cs
@@ -25,7 +25,7 @@ public class PersistentFriendPanelOpenerController : ControllerBase CanvasOrdering.SortingLayer.PERSISTENT;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Persistent;
public event Action? FriendshipNotificationClicked;
@@ -85,13 +85,13 @@ async UniTaskVoid ManageFriendRequestReceivedNotificationAsync(FriendRequestRece
switch (friendshipStatus)
{
- case FriendshipStatus.FRIEND:
+ case FriendshipStatus.Friend:
if (friendsPanelController.State != ControllerState.ViewHidden)
- friendsPanelController.ToggleTabs(FriendsPanelController.FriendsPanelTab.FRIENDS);
+ friendsPanelController.ToggleTabs(FriendsPanelController.FriendsPanelTab.Friends);
else
- mvcManager.ShowAndForget(FriendsPanelController.IssueCommand(new FriendsPanelParameter(FriendsPanelController.FriendsPanelTab.FRIENDS)), ct);
+ mvcManager.ShowAndForget(FriendsPanelController.IssueCommand(new FriendsPanelParameter(FriendsPanelController.FriendsPanelTab.Friends)), ct);
break;
- case FriendshipStatus.REQUEST_RECEIVED:
+ case FriendshipStatus.RequestReceived:
mvcManager.ShowAsync(FriendRequestController.IssueCommand(new FriendRequestParams
{
Request = new FriendRequest(
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Blocked/BlockedSectionController.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Blocked/BlockedSectionController.cs
index 132e5cc006e..9efd0e9e701 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Blocked/BlockedSectionController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Blocked/BlockedSectionController.cs
@@ -63,14 +63,14 @@ private void HideEmptyState()
}
private void UnblockUserClicked(BlockedProfile profile) =>
- mvcManager.ShowAsync(BlockUserPromptController.IssueCommand(new BlockUserPromptParams(profile.Address, profile.Profile.Name, BlockUserPromptParams.UserBlockAction.UNBLOCK))).Forget();
+ mvcManager.ShowAsync(BlockUserPromptController.IssueCommand(new BlockUserPromptParams(profile.Address, profile.Profile.Name, BlockUserPromptParams.UserBlockAction.Unblock))).Forget();
private void ContextMenuClicked(BlockedProfile friendProfile, Vector2 buttonPosition, BlockedUserView elementView)
{
lastClickedProfileCtx = friendProfile;
userProfileContextMenuControlSettings.SetInitialData(friendProfile,
- UserProfileContextMenuControlSettings.FriendshipStatus.DISABLED);
+ UserProfileContextMenuControlSettings.FriendshipStatus.Disabled);
elementView.CanUnHover = false;
mvcManager.ShowAsync(GenericContextMenuController.IssueCommand(new GenericContextMenuParameter(contextMenu, buttonPosition,
actionOnHide: () => elementView.CanUnHover = true,
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListPagedDoubleCollectionRequestManager.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListPagedDoubleCollectionRequestManager.cs
index f2633f7894a..b0ff05d35c4 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListPagedDoubleCollectionRequestManager.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListPagedDoubleCollectionRequestManager.cs
@@ -38,7 +38,7 @@ public FriendListPagedDoubleCollectionRequestManager(IFriendsService friendsServ
ProfileRepositoryWrapper profileDataProvider,
int pageSize,
int elementsMissingThreshold
- ) : base(friendsService, friendEventBus, profileDataProvider, loopListView, pageSize, elementsMissingThreshold, FriendPanelStatus.ONLINE, FriendPanelStatus.OFFLINE, STATUS_ELEMENT_INDEX, EMPTY_ELEMENT_INDEX, USER_ELEMENT_INDEX)
+ ) : base(friendsService, friendEventBus, profileDataProvider, loopListView, pageSize, elementsMissingThreshold, FriendPanelStatus.Online, FriendPanelStatus.Offline, STATUS_ELEMENT_INDEX, EMPTY_ELEMENT_INDEX, USER_ELEMENT_INDEX)
{
this.profileRepository = profileRepository;
this.friendsConnectivityStatusTracker = friendsConnectivityStatusTracker;
@@ -76,7 +76,7 @@ private void AddNewFriendProfile(Profile.CompactInfo friendProfile, OnlineStatus
{
int previousTotalCount = offlineFriends.Count + onlineFriends.Count;
- if (onlineStatus == OnlineStatus.OFFLINE)
+ if (onlineStatus == OnlineStatus.Offline)
{
offlineFriends.Add(friendProfile);
FriendsSorter.SortFriendList(offlineFriends);
@@ -96,7 +96,7 @@ private void FriendBecameOnline(Profile.CompactInfo friendProfile)
offlineFriends.Remove(friendProfile);
if (!onlineFriends.Contains(friendProfile))
- AddNewFriendProfile(friendProfile, OnlineStatus.ONLINE);
+ AddNewFriendProfile(friendProfile, OnlineStatus.Online);
RefreshLoopList();
}
@@ -106,7 +106,7 @@ private void FriendBecameAway(Profile.CompactInfo friendProfile)
offlineFriends.Remove(friendProfile);
if (!onlineFriends.Contains(friendProfile))
- AddNewFriendProfile(friendProfile, OnlineStatus.AWAY);
+ AddNewFriendProfile(friendProfile, OnlineStatus.Away);
RefreshLoopList();
}
@@ -116,7 +116,7 @@ private void FriendBecameOffline(Profile.CompactInfo friendProfile)
onlineFriends.Remove(friendProfile);
if (!offlineFriends.Contains(friendProfile))
- AddNewFriendProfile(friendProfile, OnlineStatus.OFFLINE);
+ AddNewFriendProfile(friendProfile, OnlineStatus.Offline);
RefreshLoopList();
}
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListSectionUtilities.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListSectionUtilities.cs
index 7d16acd4f5e..b696871864e 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListSectionUtilities.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListSectionUtilities.cs
@@ -71,7 +71,7 @@ async UniTaskVoid JumpToFriendLocationAsync(CancellationToken ct = default)
}
public static void BlockUserClicked(IMVCManager mvcManager, Web3Address targetUserAddress, string targetUserName) =>
- mvcManager.ShowAsync(BlockUserPromptController.IssueCommand(new BlockUserPromptParams(targetUserAddress, targetUserName, BlockUserPromptParams.UserBlockAction.BLOCK))).Forget();
+ mvcManager.ShowAsync(BlockUserPromptController.IssueCommand(new BlockUserPromptParams(targetUserAddress, targetUserName, BlockUserPromptParams.UserBlockAction.Block))).Forget();
internal static void OpenProfilePassport(Profile.CompactInfo profile, IPassportBridge passportBridge) =>
passportBridge.ShowAsync(profile.Address).Forget();
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListUserView.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListUserView.cs
index 7fc42a97247..fbc89678b1f 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListUserView.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendListUserView.cs
@@ -28,7 +28,7 @@ public override void Configure(Profile.CompactInfo profile, ProfileRepositoryWra
buttons.Add(ContextMenuButton);
buttons.Add(ChatButton);
base.Configure(profile, profileDataProvider);
- SetOnlineStatus(OnlineStatus.OFFLINE);
+ SetOnlineStatus(OnlineStatus.Offline);
}
public void SetOnlineStatus(OnlineStatus onlineStatus)
@@ -41,7 +41,7 @@ public void SetOnlineStatus(OnlineStatus onlineStatus)
buttons.Add(ContextMenuButton);
buttons.Add(ChatButton);
- if (onlineStatus != OnlineStatus.OFFLINE)
+ if (onlineStatus != OnlineStatus.Offline)
buttons.Add(JumpInButton);
}
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendSectionController.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendSectionController.cs
index 5cd55e1f4cf..6bf5c91a41d 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendSectionController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendSectionController.cs
@@ -62,7 +62,7 @@ private void ContextMenuClicked(Profile.CompactInfo friendProfile, Vector2 butto
UniTask menuTask = UniTask.WhenAny(panelLifecycleTask!.Task, contextMenuTask.Task);
ViewDependencies.GlobalUIViews.ShowUserProfileContextMenuFromWalletIdAsync(new Web3Address(friendProfile.UserId), buttonPosition, default(Vector2),
- popupCts.Token, menuTask, onHide: () => elementView.CanUnHover = true, anchorPoint: MenuAnchorPoint.TOP_RIGHT).Forget();
+ popupCts.Token, menuTask, onHide: () => elementView.CanUnHover = true, anchorPoint: MenuAnchorPoint.TopRight).Forget();
}
private void JumpInClicked(Profile.CompactInfo profile) =>
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendsSectionDoubleCollectionController.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendsSectionDoubleCollectionController.cs
index c39baa0c56d..d52502e94b4 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendsSectionDoubleCollectionController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Friends/FriendsSectionDoubleCollectionController.cs
@@ -102,7 +102,7 @@ private async UniTaskVoid WaitAndOpenPassportAsync(Profile.CompactInfo profile,
{
elementClicked = true;
- if (friendsConnectivityStatusTracker.GetFriendStatus(profile.Address) != OnlineStatus.OFFLINE)
+ if (friendsConnectivityStatusTracker.GetFriendStatus(profile.Address) != OnlineStatus.Offline)
OnlineFriendClicked?.Invoke(profile.Address);
await UniTask.Delay(TimeSpan.FromSeconds(DELAY_BETWEEN_CLICKS), cancellationToken: ct);
@@ -116,14 +116,14 @@ private void OnContextMenuClicked(Profile.CompactInfo friendProfile, Vector2 but
popupCts = popupCts.SafeRestart();
elementView.CanUnHover = false;
- bool isFriendOnline = friendsConnectivityStatusTracker.GetFriendStatus(friendProfile.UserId) != OnlineStatus.OFFLINE;
+ bool isFriendOnline = friendsConnectivityStatusTracker.GetFriendStatus(friendProfile.UserId) != OnlineStatus.Offline;
if (isFriendOnline)
OnlineFriendClicked?.Invoke(friendProfile.UserId);
ViewDependencies.GlobalUIViews.ShowUserProfileContextMenuFromWalletIdAsync(new Web3Address(friendProfile.UserId),
buttonPosition, default(Vector2), popupCts.Token, closeMenuTask: panelLifecycleTask!.Task, onHide: () => elementView.CanUnHover = true
- ,anchorPoint: MenuAnchorPoint.TOP_RIGHT).Forget();
+ ,anchorPoint: MenuAnchorPoint.TopRight).Forget();
}
private void OnJumpInClicked(Profile.CompactInfo profile)
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestUserView.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestUserView.cs
index 8d5f6d66728..06b7a5aa48a 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestUserView.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestUserView.cs
@@ -38,7 +38,7 @@ public FriendPanelStatus ParentStatus
set
{
parentStatus = value;
- if (value == FriendPanelStatus.SENT)
+ if (value == FriendPanelStatus.Sent)
InhibitInteractionButtons();
}
}
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestsRequestManager.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestsRequestManager.cs
index 07e210e1743..ae83fe94baa 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestsRequestManager.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestsRequestManager.cs
@@ -33,7 +33,7 @@ public RequestsRequestManager(IFriendsService friendsService,
ProfileRepositoryWrapper profileDataProvider,
int pageSize,
LoopListView2 loopListView)
- : base(friendsService, friendEventBus, profileDataProvider, loopListView, pageSize, REQUEST_THRESHOLD, FriendPanelStatus.RECEIVED, FriendPanelStatus.SENT, STATUS_ELEMENT_INDEX, EMPTY_ELEMENT_INDEX, USER_ELEMENT_INDEX, true)
+ : base(friendsService, friendEventBus, profileDataProvider, loopListView, pageSize, REQUEST_THRESHOLD, FriendPanelStatus.Received, FriendPanelStatus.Sent, STATUS_ELEMENT_INDEX, EMPTY_ELEMENT_INDEX, USER_ELEMENT_INDEX, true)
{
this.loopListView = loopListView;
@@ -135,7 +135,7 @@ protected override void CustomiseElement(RequestUserView elementView, int collec
{
elementView.ParentStatus = section;
- if (section != FriendPanelStatus.SENT)
+ if (section != FriendPanelStatus.Sent)
{
elementView.DeleteButton.onClick.RemoveAllListeners();
elementView.DeleteButton.onClick.AddListener(() => DeleteRequestClicked?.Invoke(receivedRequests[collectionIndex]));
@@ -150,13 +150,13 @@ protected override void CustomiseElement(RequestUserView elementView, int collec
}
elementView.SafelyResetMainButtonListeners();
- elementView.MainButton.onClick.AddListener(() => RequestClicked?.Invoke(section == FriendPanelStatus.SENT ? sentRequests[collectionIndex] : receivedRequests[collectionIndex]));
+ elementView.MainButton.onClick.AddListener(() => RequestClicked?.Invoke(section == FriendPanelStatus.Sent ? sentRequests[collectionIndex] : receivedRequests[collectionIndex]));
elementView.ContextMenuButton.onClick.RemoveAllListeners();
elementView.ContextMenuButton.onClick.AddListener(() => ContextMenuClicked?.Invoke(elementView.UserProfile, elementView.ContextMenuButton.transform.position, elementView));
thumbnailContextMenuActions[elementView.UserProfile.Address.ToString()] = () => ContextMenuClicked?.Invoke(elementView.UserProfile, elementView.ContextMenuButton.transform.position, elementView);
- FriendRequest request = section == FriendPanelStatus.RECEIVED ? receivedRequests[collectionIndex] : sentRequests[collectionIndex];
+ FriendRequest request = section == FriendPanelStatus.Received ? receivedRequests[collectionIndex] : sentRequests[collectionIndex];
elementView.RequestDate = request.Timestamp;
elementView.HasMessageIndicator.SetActive(!string.IsNullOrEmpty(request.MessageBody));
}
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestsSectionController.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestsSectionController.cs
index 3534b3d3b00..9d62ffa2e26 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestsSectionController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/Sections/Requests/RequestsSectionController.cs
@@ -63,7 +63,7 @@ public RequestsSectionController(RequestsSectionView view,
.AddControl(new SeparatorContextMenuControlSettings(CONTEXT_MENU_SEPARATOR_HEIGHT, -CONTEXT_MENU_VERTICAL_LAYOUT_PADDING.left, -CONTEXT_MENU_VERTICAL_LAYOUT_PADDING.right))
.AddControl(new GenericContextMenuElement(new ButtonContextMenuControlSettings(view.ContextMenuSettings.BlockText, view.ContextMenuSettings.BlockSprite, () => BlockUserClicked(lastClickedProfileCtx!.Value), iconColor: redColor, textColor: redColor), includeUserBlocking));
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.REPORT_USER))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.ReportUser))
contextMenu.AddControl(new ButtonContextMenuControlSettings(view.ContextMenuSettings.ReportText, view.ContextMenuSettings.ReportOptionSprite, () => ReportUserClicked(lastClickedProfileCtx!.Value), iconColor: redColor, textColor: redColor));
requestManager.DeleteRequestClicked += DeleteRequestClicked;
@@ -132,9 +132,9 @@ private void HandleContextMenuUserProfileButton(Profile.CompactInfo userData, Us
{
friendshipOperationCts = friendshipOperationCts.SafeRestart();
- if (friendshipStatus == UserProfileContextMenuControlSettings.FriendshipStatus.REQUEST_SENT)
+ if (friendshipStatus == UserProfileContextMenuControlSettings.FriendshipStatus.RequestSent)
CancelFriendshipRequestAsync(friendshipOperationCts.Token).Forget();
- else if (friendshipStatus == UserProfileContextMenuControlSettings.FriendshipStatus.REQUEST_RECEIVED)
+ else if (friendshipStatus == UserProfileContextMenuControlSettings.FriendshipStatus.RequestReceived)
mvcManager.ShowAsync(FriendRequestController.IssueCommand(new FriendRequestParams { OneShotFriendAccepted = lastClickedProfileCtx }), ct: friendshipOperationCts.Token).Forget();
return;
@@ -202,7 +202,7 @@ private void ContextMenuClicked(Profile.CompactInfo friendProfile, Vector2 butto
lastClickedProfileCtx = friendProfile;
userProfileContextMenuControlSettings.SetInitialData(friendProfile,
- elementView.ParentStatus == FriendPanelStatus.SENT ? UserProfileContextMenuControlSettings.FriendshipStatus.REQUEST_SENT : UserProfileContextMenuControlSettings.FriendshipStatus.REQUEST_RECEIVED);
+ elementView.ParentStatus == FriendPanelStatus.Sent ? UserProfileContextMenuControlSettings.FriendshipStatus.RequestSent : UserProfileContextMenuControlSettings.FriendshipStatus.RequestReceived);
elementView.CanUnHover = false;
mvcManager.ShowAsync(GenericContextMenuController.IssueCommand(new GenericContextMenuParameter(contextMenu, buttonPosition,
actionOnHide: () => elementView.CanUnHover = true,
diff --git a/Explorer/Assets/DCL/Friends/UI/FriendPanel/StatusWrapperView.cs b/Explorer/Assets/DCL/Friends/UI/FriendPanel/StatusWrapperView.cs
index c4783484866..43e9c33d2a8 100644
--- a/Explorer/Assets/DCL/Friends/UI/FriendPanel/StatusWrapperView.cs
+++ b/Explorer/Assets/DCL/Friends/UI/FriendPanel/StatusWrapperView.cs
@@ -8,10 +8,10 @@ namespace DCL.Friends.UI.FriendPanel
{
public enum FriendPanelStatus
{
- ONLINE,
- OFFLINE,
- RECEIVED,
- SENT,
+ Online,
+ Offline,
+ Received,
+ Sent,
}
public class StatusWrapperView : MonoBehaviour
@@ -38,10 +38,10 @@ public void SetStatusText(FriendPanelStatus status, int amount)
panelStatus = status;
string statusText = status switch
{
- FriendPanelStatus.ONLINE => "ONLINE",
- FriendPanelStatus.OFFLINE => "OFFLINE",
- FriendPanelStatus.RECEIVED => "RECEIVED",
- FriendPanelStatus.SENT => "SENT",
+ FriendPanelStatus.Online => "ONLINE",
+ FriendPanelStatus.Offline => "OFFLINE",
+ FriendPanelStatus.Received => "RECEIVED",
+ FriendPanelStatus.Sent => "SENT",
_ => "Unknown"
};
diff --git a/Explorer/Assets/DCL/Friends/UI/PushNotifications/FriendPushNotificationController.cs b/Explorer/Assets/DCL/Friends/UI/PushNotifications/FriendPushNotificationController.cs
index 144c0896ea6..e6d3e1d473e 100644
--- a/Explorer/Assets/DCL/Friends/UI/PushNotifications/FriendPushNotificationController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/PushNotifications/FriendPushNotificationController.cs
@@ -73,7 +73,7 @@ async UniTaskVoid ResolveThumbnailAndShowAsync(CancellationToken ct)
}
}
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.PERSISTENT;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Persistent;
protected override UniTask WaitForCloseIntentAsync(CancellationToken ct) =>
UniTask.Never(ct);
diff --git a/Explorer/Assets/DCL/Friends/UI/Requests/FriendRequestController.cs b/Explorer/Assets/DCL/Friends/UI/Requests/FriendRequestController.cs
index 77a4ab43d46..a28a91b5be3 100644
--- a/Explorer/Assets/DCL/Friends/UI/Requests/FriendRequestController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/Requests/FriendRequestController.cs
@@ -21,13 +21,13 @@ public class FriendRequestController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
public FriendRequestController(ViewFactoryMethod viewFactory,
IWeb3IdentityCache identityCache,
@@ -101,19 +101,19 @@ protected override void OnViewShow()
if (inputData.DestinationUser == null)
throw new Exception("Destination user must be set for new friend request");
- Toggle(ViewState.SEND_NEW);
+ Toggle(ViewState.SendNew);
SetUpAsNew();
}
else
{
if (selfAddress.ToString() == fr.From.Address)
{
- Toggle(ViewState.CANCEL);
+ Toggle(ViewState.Cancel);
SetUpAsCancel();
}
else if (selfAddress.ToString() == fr.To.Address)
{
- Toggle(ViewState.RECEIVED);
+ Toggle(ViewState.Received);
SetUpAsReceived();
}
}
@@ -136,13 +136,13 @@ private void Close()
private void Toggle(ViewState state)
{
- viewInstance!.send.Root.SetActive(state == ViewState.SEND_NEW);
- viewInstance.cancel.Root.SetActive(state == ViewState.CANCEL);
- viewInstance.received.Root.SetActive(state == ViewState.RECEIVED);
- viewInstance.cancelledConfirmed.Root.SetActive(state == ViewState.CONFIRMED_CANCELLED);
- viewInstance.acceptedConfirmed.Root.SetActive(state == ViewState.CONFIRMED_ACCEPTED);
- viewInstance.rejectedConfirmed.Root.SetActive(state == ViewState.CONFIRMED_REJECTED);
- viewInstance.sentConfirmed.Root.SetActive(state == ViewState.CONFIRMED_SENT);
+ viewInstance!.send.Root.SetActive(state == ViewState.SendNew);
+ viewInstance.cancel.Root.SetActive(state == ViewState.Cancel);
+ viewInstance.received.Root.SetActive(state == ViewState.Received);
+ viewInstance.cancelledConfirmed.Root.SetActive(state == ViewState.ConfirmedCancelled);
+ viewInstance.acceptedConfirmed.Root.SetActive(state == ViewState.ConfirmedAccepted);
+ viewInstance.rejectedConfirmed.Root.SetActive(state == ViewState.ConfirmedRejected);
+ viewInstance.sentConfirmed.Root.SetActive(state == ViewState.ConfirmedSent);
}
private void SetUpAsNew()
@@ -281,7 +281,7 @@ async UniTaskVoid SendAsync(CancellationToken ct)
if (result.Success)
{
await ShowOperationConfirmationAsync(
- ViewState.CONFIRMED_SENT,
+ ViewState.ConfirmedSent,
viewInstance.sentConfirmed, result.Value.To,
FRIEND_REQUEST_SENT_FORMAT,
ct);
@@ -305,7 +305,7 @@ async UniTaskVoid RejectThenCloseAsync(CancellationToken ct)
// Dont show confirmation on negative actions
// await ShowOperationConfirmationAsync(
- // ViewState.CONFIRMED_REJECTED,
+ // ViewState.ConfirmedRejected,
// viewInstance!.rejectedConfirmed, inputData.Request.From,
// "Friend Request From {0} Rejected",
// ct);
@@ -327,7 +327,7 @@ async UniTaskVoid AcceptThenCloseAsync(CancellationToken ct)
if (result.Success)
{
await ShowOperationConfirmationAsync(
- ViewState.CONFIRMED_ACCEPTED,
+ ViewState.ConfirmedAccepted,
viewInstance!.acceptedConfirmed, target,
FRIEND_REQUEST_ACCEPTED_FORMAT,
ct);
@@ -349,7 +349,7 @@ async UniTaskVoid CancelThenCloseAsync(CancellationToken ct)
// Dont show confirmation on negative actions
// await ShowOperationConfirmationAsync(
- // ViewState.CONFIRMED_CANCELLED,
+ // ViewState.ConfirmedCancelled,
// viewInstance!.cancelledConfirmed, inputData.Request.To,
// "Friend Request To {0} Cancelled",
// ct);
@@ -379,10 +379,10 @@ private void UpdateBodyMessageCharacterCount(string text) =>
viewInstance!.send.MessageCharacterCountText.text = $"{text.Length}/140";
private void BlockUnwantedInputs() =>
- inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA, InputMapComponent.Kind.CAMERA, InputMapComponent.Kind.PLAYER);
+ inputBlock.Disable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera, InputMapComponent.Kind.Camera, InputMapComponent.Kind.Player);
private void UnblockUnwantedInputs() =>
- inputBlock.Enable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA, InputMapComponent.Kind.CAMERA, InputMapComponent.Kind.PLAYER);
+ inputBlock.Enable(InputMapComponent.Kind.Shortcuts, InputMapComponent.Kind.InWorldCamera, InputMapComponent.Kind.Camera, InputMapComponent.Kind.Player);
private async UniTask ShowOperationConfirmationAsync(
ViewState state,
@@ -394,7 +394,7 @@ private async UniTask ShowOperationConfirmationAsync(
if (config.MyThumbnail != null)
{
- Profile? myProfile = await profileRepository.GetAsync(identityCache.EnsuredIdentity().Address, ct, IProfileRepository.FetchBehaviour.DELAY_UNTIL_RESOLVED);
+ Profile? myProfile = await profileRepository.GetAsync(identityCache.EnsuredIdentity().Address, ct, IProfileRepository.FetchBehaviour.DelayUntilResolved);
if (myProfile != null)
config.MyThumbnail.SetupAsync(profileRepositoryWrapper, myProfile.UserNameColor, myProfile.Compact.FaceSnapshotUrl, myProfile.UserId, ct).Forget();
diff --git a/Explorer/Assets/DCL/Friends/UI/UnfriendConfirmationPopupController.cs b/Explorer/Assets/DCL/Friends/UI/UnfriendConfirmationPopupController.cs
index 360d1259c0c..9fd8ddc9d2b 100644
--- a/Explorer/Assets/DCL/Friends/UI/UnfriendConfirmationPopupController.cs
+++ b/Explorer/Assets/DCL/Friends/UI/UnfriendConfirmationPopupController.cs
@@ -20,7 +20,7 @@ public class UnfriendConfirmationPopupController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
public UnfriendConfirmationPopupController(ViewFactoryMethod viewFactory,
IFriendsService friendsService,
diff --git a/Explorer/Assets/DCL/InWorldCamera/CameraReelGallery/CameraReelGalleryController.cs b/Explorer/Assets/DCL/InWorldCamera/CameraReelGallery/CameraReelGalleryController.cs
index 756d80f8d2b..9b295716da9 100644
--- a/Explorer/Assets/DCL/InWorldCamera/CameraReelGallery/CameraReelGalleryController.cs
+++ b/Explorer/Assets/DCL/InWorldCamera/CameraReelGallery/CameraReelGalleryController.cs
@@ -28,8 +28,8 @@ public class CameraReelGalleryController : IDisposable
{
private enum ScrollDirection
{
- UP,
- DOWN
+ Up,
+ Down
}
private struct ReelToDeleteInfo
@@ -202,13 +202,13 @@ async UniTaskVoid DownloadAndOpenAsync(CancellationToken ct)
await ReelCommonActions.DownloadReelToFileAsync(response.url, ct);
ScreenshotDownloaded?.Invoke();
- view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.DOWNLOAD,
+ view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Download,
reelGalleryStringMessages?.PhotoSuccessfullyDownloadedMessage);
}
catch (Exception e)
{
ReportHub.LogException(e, new ReportData(ReportCategory.CAMERA_REEL));
- view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.FAILURE);
+ view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Failure);
}
}
@@ -219,7 +219,7 @@ async UniTaskVoid DownloadAndOpenAsync(CancellationToken ct)
private void CopyPictureLink(CameraReelResponseCompact response)
{
ReelCommonActions.CopyReelLink(response.id, decentralandUrlsSource!, systemClipboard!);
- view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.SUCCESS, reelGalleryStringMessages?.LinkCopiedMessage);
+ view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Success, reelGalleryStringMessages?.LinkCopiedMessage);
}
private void ShareToX(CameraReelResponseCompact response)
@@ -236,12 +236,12 @@ async UniTaskVoid SetPublicFlagAsync(CancellationToken ct)
{
await cameraReelStorageService.UpdateScreenshotVisibilityAsync(response.id, isPublic, ct);
response.isPublic = isPublic;
- view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.SUCCESS, reelGalleryStringMessages?.PhotoSuccessfullyUpdatedMessage);
+ view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Success, reelGalleryStringMessages?.PhotoSuccessfullyUpdatedMessage);
}
catch (UnityWebRequestException e)
{
ReportHub.LogException(e, new ReportData(ReportCategory.CAMERA_REEL));
- view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.FAILURE);
+ view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Failure);
}
}
@@ -299,13 +299,13 @@ private async UniTask DeleteScreenshotsAsync(ReelToDeleteInfo reelToDeleteInfo,
ScreenshotDeleted?.Invoke();
StorageUpdated?.Invoke(response);
- view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.SUCCESS, reelGalleryStringMessages?.PhotoSuccessfullyDeletedMessage);
+ view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Success, reelGalleryStringMessages?.PhotoSuccessfullyDeletedMessage);
}
catch (UnityWebRequestException e)
{
ReportHub.LogException(e, new ReportData(ReportCategory.CAMERA_REEL));
- view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.FAILURE);
+ view.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Failure);
}
}
@@ -520,7 +520,7 @@ private async UniTask LoadMorePageAsync(CancellationToken ct)
return;
}
- HandleElementsVisibility(ScrollDirection.UP);
+ HandleElementsVisibility(ScrollDirection.Up);
previousY = view.scrollRect.verticalNormalizedPosition;
isLoading = false;
@@ -540,7 +540,7 @@ private void OnScrollRectValueChanged(Vector2 value)
if (view.scrollRect is { verticalNormalizedPosition: >= 1f, velocity: { y: > 0f } } or { verticalNormalizedPosition: <= 0f, velocity: { y: < 0f } })
return;
- HandleElementsVisibility(value.y > previousY ? ScrollDirection.UP : ScrollDirection.DOWN);
+ HandleElementsVisibility(value.y > previousY ? ScrollDirection.Up : ScrollDirection.Down);
CheckNeedsToLoadMore();
previousY = value.y;
@@ -591,7 +591,7 @@ private void HandleElementsVisibility(ScrollDirection scrollDirection)
{
if (currentSize == 0) return;
- if (scrollDirection == ScrollDirection.UP)
+ if (scrollDirection == ScrollDirection.Up)
{
while (beginVisible >= 0 && ViewIntersectsImage(thumbnailImages[beginVisible].view.thumbnailImage))
beginVisible--;
diff --git a/Explorer/Assets/DCL/InWorldCamera/CameraReelToast/CameraReelToastMessage.cs b/Explorer/Assets/DCL/InWorldCamera/CameraReelToast/CameraReelToastMessage.cs
index 9787365764c..36a23ba3a9e 100644
--- a/Explorer/Assets/DCL/InWorldCamera/CameraReelToast/CameraReelToastMessage.cs
+++ b/Explorer/Assets/DCL/InWorldCamera/CameraReelToast/CameraReelToastMessage.cs
@@ -9,9 +9,9 @@ namespace DCL.InWorldCamera.CameraReelToast
{
public enum CameraReelToastMessageType
{
- FAILURE,
- SUCCESS,
- DOWNLOAD
+ Failure,
+ Success,
+ Download
}
public class CameraReelToastMessage : MonoBehaviour
@@ -58,13 +58,13 @@ public void ShowToastMessage(CameraReelToastMessageType type, string? message =
switch (type)
{
- case CameraReelToastMessageType.SUCCESS:
+ case CameraReelToastMessageType.Success:
ShowNotificationAsync(message, SuccessToastDefaultMessage, SuccessToastView, SuccessToastDuration, showSuccessCts.Token).Forget();
break;
- case CameraReelToastMessageType.FAILURE:
+ case CameraReelToastMessageType.Failure:
ShowNotificationAsync(message, FailureToastDefaultMessage, FailureToastView, FailureToastDuration, showFailureCts.Token).Forget();
break;
- case CameraReelToastMessageType.DOWNLOAD:
+ case CameraReelToastMessageType.Download:
DownloadToastView.PrepareToBeClicked();
ShowNotificationAsync(message, SuccessToastDefaultMessage,
diff --git a/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/ScreenRecorder.cs b/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/ScreenRecorder.cs
index bfb6163ed6b..66d5c0cd40e 100644
--- a/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/ScreenRecorder.cs
+++ b/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/ScreenRecorder.cs
@@ -8,10 +8,10 @@ namespace DCL.InWorldCamera
{
public enum RecordingState
{
- UNKNOWN = 0,
- IDLE = 1,
- CAPTURING = 2,
- SCREENSHOT_READY = 3,
+ Unknown = 0,
+ Idle = 1,
+ Capturing = 2,
+ ScreenshotReady = 3,
}
public sealed class ScreenRecorder : IDisposable
@@ -32,7 +32,7 @@ public sealed class ScreenRecorder : IDisposable
private ScreenFrameData debugTargetScreenFrame;
- public RecordingState State { get; private set; } = RecordingState.IDLE;
+ public RecordingState State { get; private set; } = RecordingState.Idle;
public ScreenRecorder(RectTransform canvasRectTransform)
{
@@ -53,7 +53,7 @@ public void Dispose()
public IEnumerator CaptureScreenshot()
{
- State = RecordingState.CAPTURING;
+ State = RecordingState.Capturing;
yield return GameObjectExtensions.WAIT_FOR_END_OF_FRAME; // for UI to appear on screenshot. Converting to UniTask didn't work :(
@@ -76,7 +76,7 @@ public IEnumerator CaptureScreenshot()
Object.Destroy(screenshotTexture);
Object.Destroy(newScreenShot);
- State = RecordingState.SCREENSHOT_READY;
+ State = RecordingState.ScreenshotReady;
}
private void UpscaleTexture2D(Texture2D sourceTexture, int upscaleFactor)
@@ -103,10 +103,10 @@ private void UpscaleTexture2D(Texture2D sourceTexture, int upscaleFactor)
public Texture2D? GetScreenshotAndReset()
{
- if (State != RecordingState.SCREENSHOT_READY)
+ if (State != RecordingState.ScreenshotReady)
return null;
- State = RecordingState.IDLE;
+ State = RecordingState.Idle;
return screenshot;
}
diff --git a/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/Systems/CaptureScreenshotSystem.cs b/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/Systems/CaptureScreenshotSystem.cs
index a2f373df8f8..83f5965750f 100644
--- a/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/Systems/CaptureScreenshotSystem.cs
+++ b/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/Systems/CaptureScreenshotSystem.cs
@@ -74,10 +74,10 @@ protected override void OnDispose()
protected override void Update(float t)
{
- if (recorder.State == RecordingState.CAPTURING || hudController.IsVfxInProgress)
+ if (recorder.State == RecordingState.Capturing || hudController.IsVfxInProgress)
return;
- if (recorder.State == RecordingState.SCREENSHOT_READY && metadataBuilder.MetadataIsReady)
+ if (recorder.State == RecordingState.ScreenshotReady && metadataBuilder.MetadataIsReady)
{
ProcessCapturedScreenshot();
return;
@@ -111,7 +111,7 @@ private void ProcessCapturedScreenshot()
private bool ScreenshotIsRequested()
{
- if (recorder.State != RecordingState.IDLE) return false;
+ if (recorder.State != RecordingState.Idle) return false;
if (World.TryGet(camera, out TakeScreenshotRequest request))
{
diff --git a/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/Systems/ToggleInWorldCameraActivitySystem.cs b/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/Systems/ToggleInWorldCameraActivitySystem.cs
index 45f0dbff4af..af7c68236d1 100644
--- a/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/Systems/ToggleInWorldCameraActivitySystem.cs
+++ b/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/Systems/ToggleInWorldCameraActivitySystem.cs
@@ -145,7 +145,7 @@ private void DisableCamera(CameraMode? targetMode)
ref CursorComponent cursorComponent = ref World.Get(camera);
cursorComponent.CursorState = CursorState.Free;
- SwitchCameraInput(to: Kind.PLAYER);
+ SwitchCameraInput(to: Kind.Player);
World.Remove(camera);
@@ -177,7 +177,7 @@ private void EnableCamera()
ref CursorComponent cursorComponent = ref World.Get(camera);
cursorComponent.CursorState = CursorState.Locked;
- SwitchCameraInput(to: Kind.IN_WORLD_CAMERA);
+ SwitchCameraInput(to: Kind.InWorldCamera);
World.Add(camera,
new InWorldCameraComponent(),
@@ -244,14 +244,14 @@ private void SwitchCameraInput(Kind to)
switch (to)
{
- case Kind.IN_WORLD_CAMERA:
- inputMapComponent.BlockInput(Kind.PLAYER);
- inputMapComponent.BlockInput(Kind.SHORTCUTS);
+ case Kind.InWorldCamera:
+ inputMapComponent.BlockInput(Kind.Player);
+ inputMapComponent.BlockInput(Kind.Shortcuts);
break;
- case Kind.PLAYER:
+ case Kind.Player:
DCLInput.Instance.Shortcuts.CameraReel.Disable();
- inputMapComponent.UnblockInput(Kind.PLAYER);
- inputMapComponent.UnblockInput(Kind.SHORTCUTS);
+ inputMapComponent.UnblockInput(Kind.Player);
+ inputMapComponent.UnblockInput(Kind.Shortcuts);
break;
}
}
diff --git a/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/UI/InWorldCameraController.cs b/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/UI/InWorldCameraController.cs
index 501d32a8892..2686f34b2e5 100644
--- a/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/UI/InWorldCameraController.cs
+++ b/Explorer/Assets/DCL/InWorldCamera/InWorldCamera/UI/InWorldCameraController.cs
@@ -32,7 +32,7 @@ public class InWorldCameraController : ControllerBase
private CancellationTokenSource ctx;
- public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.OVERLAY;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Overlay;
private SingleInstanceEntity? camera => cameraInternal ??= world.CacheCamera();
private SingleInstanceEntity? cameraInternal;
diff --git a/Explorer/Assets/DCL/InWorldCamera/PhotoDetail/PhotoDetailController.cs b/Explorer/Assets/DCL/InWorldCamera/PhotoDetail/PhotoDetailController.cs
index d13e61a6b1e..c59ee601fc6 100644
--- a/Explorer/Assets/DCL/InWorldCamera/PhotoDetail/PhotoDetailController.cs
+++ b/Explorer/Assets/DCL/InWorldCamera/PhotoDetail/PhotoDetailController.cs
@@ -50,7 +50,7 @@ public class PhotoDetailController : ControllerBase CanvasOrdering.SortingLayer.POPUP;
+ public override CanvasOrdering.SortingLayer Layer => CanvasOrdering.SortingLayer.Popup;
public PhotoDetailController(ViewFactoryMethod viewFactory,
PhotoDetailInfoController photoDetailInfoController,
@@ -184,13 +184,13 @@ async UniTaskVoid DownloadAndOpenAsync(CancellationToken ct)
ScreenshotDownloaded?.Invoke();
viewInstance!.cameraReelToastMessage?.ShowToastMessage(
- CameraReelToastMessageType.DOWNLOAD,
+ CameraReelToastMessageType.Download,
photoDetailStringMessages.PhotoSuccessfullyDownloadedMessage);
}
catch (Exception e)
{
ReportHub.LogException(e, new ReportData(ReportCategory.CAMERA_REEL));
- viewInstance!.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.FAILURE);
+ viewInstance!.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Failure);
}
}
@@ -200,7 +200,7 @@ async UniTaskVoid DownloadAndOpenAsync(CancellationToken ct)
private void CopyReelLinkClicked()
{
ReelCommonActions.CopyReelLink(inputData.AllReels[currentReelIndex].id, decentralandUrlsSource, systemClipboard);
- viewInstance!.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.SUCCESS, photoDetailStringMessages.LinkCopiedMessage);
+ viewInstance!.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Success, photoDetailStringMessages.LinkCopiedMessage);
}
private void ShareReelClicked()
@@ -227,7 +227,7 @@ async UniTaskVoid SetPublicFlagAsync(CancellationToken ct)
await cameraReelStorageService.UpdateScreenshotVisibilityAsync(reelId,
isPublic, ct);
galleryEventBus.ReelPublicStateChanged(reelId, isPublic);
- viewInstance!.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.SUCCESS,
+ viewInstance!.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Success,
photoDetailStringMessages.PhotoSuccessfullyUpdatedMessage);
if(!isPublic)
@@ -237,7 +237,7 @@ await cameraReelStorageService.UpdateScreenshotVisibilityAsync(reelId,
catch (Exception e)
{
ReportHub.LogException(e, new ReportData(ReportCategory.CAMERA_REEL));
- viewInstance!.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.FAILURE);
+ viewInstance!.cameraReelToastMessage?.ShowToastMessage(CameraReelToastMessageType.Failure);
}
}
diff --git a/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/CRDTProtocolShould.cs b/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/CRDTProtocolShould.cs
index 9c8ac8f5a37..0082f351e7f 100644
--- a/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/CRDTProtocolShould.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/CRDTProtocolShould.cs
@@ -43,7 +43,7 @@ private void AssertTestFile(ParsedCRDTTestFile parsedFile)
{
ParsedCRDTTestFile.TestFileInstruction instruction = parsedFile.fileInstructions[i];
- if (instruction.instructionType == ParsedCRDTTestFile.InstructionType.MESSAGE)
+ if (instruction.instructionType == ParsedCRDTTestFile.InstructionType.Message)
{
(CRDTMessage msg, CRDTReconciliationResult? expectedResult) = ParsedCRDTTestFile.InstructionToMessage(instruction, crdtPooledMemoryAllocator);
CRDTReconciliationResult result = crdt.ProcessMessage(msg);
@@ -54,7 +54,7 @@ private void AssertTestFile(ParsedCRDTTestFile parsedFile)
+ $"in line:{instruction.lineNumber} for file {instruction.fileName}. Expected: {expectedResult}, actual: {result}");
}
}
- else if (instruction.instructionType == ParsedCRDTTestFile.InstructionType.FINAL_STATE)
+ else if (instruction.instructionType == ParsedCRDTTestFile.InstructionType.FinalState)
{
CRDTProtocol.State finalState = ParsedCRDTTestFile.InstructionToFinalState(instruction);
bool sameState = AreStatesEqual(crdt.CRDTState, finalState, out string reason);
@@ -75,12 +75,12 @@ private void AssertGetCurrentState(ParsedCRDTTestFile parsedFile)
{
ParsedCRDTTestFile.TestFileInstruction instruction = parsedFile.fileInstructions[i];
- if (instruction.instructionType == ParsedCRDTTestFile.InstructionType.MESSAGE)
+ if (instruction.instructionType == ParsedCRDTTestFile.InstructionType.Message)
{
(CRDTMessage msg, _) = ParsedCRDTTestFile.InstructionToMessage(instruction, crdtPooledMemoryAllocator);
crdt.ProcessMessage(msg);
}
- else if (instruction.instructionType == ParsedCRDTTestFile.InstructionType.FINAL_STATE)
+ else if (instruction.instructionType == ParsedCRDTTestFile.InstructionType.FinalState)
{
// The order of messages is not important
diff --git a/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/CRDTTestsUtils.cs b/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/CRDTTestsUtils.cs
index 49bc4800f32..586d07a7533 100644
--- a/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/CRDTTestsUtils.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/CRDTTestsUtils.cs
@@ -42,7 +42,7 @@ public static ParsedCRDTTestFile ParseTestFile(string filePath)
parsedFile.fileInstructions.Add(new ParsedCRDTTestFile.TestFileInstruction
{
fileName = filePath,
- instructionType = ParsedCRDTTestFile.InstructionType.FINAL_STATE,
+ instructionType = ParsedCRDTTestFile.InstructionType.FinalState,
instructionValue = line,
lineNumber = lineNumber,
testSpect = testSpecName,
@@ -56,7 +56,7 @@ public static ParsedCRDTTestFile ParseTestFile(string filePath)
parsedFile.fileInstructions.Add(new ParsedCRDTTestFile.TestFileInstruction
{
fileName = filePath,
- instructionType = ParsedCRDTTestFile.InstructionType.MESSAGE,
+ instructionType = ParsedCRDTTestFile.InstructionType.Message,
instructionValue = line,
lineNumber = lineNumber,
testSpect = testSpecName,
diff --git a/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/ParsedCRDTTestFile.cs b/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/ParsedCRDTTestFile.cs
index e3806b76bc1..c88cf4b44fd 100644
--- a/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/ParsedCRDTTestFile.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CRDT/CRDTTests/Protocol/ParsedCRDTTestFile.cs
@@ -11,8 +11,8 @@ public class ParsedCRDTTestFile
{
public enum InstructionType
{
- MESSAGE = 0,
- FINAL_STATE = 1,
+ Message = 0,
+ FinalState = 1,
}
public string fileName;
diff --git a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/ISceneCommunicationPipe.cs b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/ISceneCommunicationPipe.cs
index 6aef631d34e..99d7bf29b4e 100644
--- a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/ISceneCommunicationPipe.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/ISceneCommunicationPipe.cs
@@ -17,12 +17,12 @@ public enum ConnectivityAssertiveness
///
/// Message will be dropped silently if the scene is not connected
///
- DROP_IF_NOT_CONNECTED = 0,
+ DropIfNotConnected = 0,
///
/// Additional information will be printed if the scene is not connected
///
- DELIVERY_ASSERTED = 1,
+ DeliveryAsserted = 1,
}
public delegate void SceneMessageHandler(DecodedMessage message);
diff --git a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementation.cs b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementation.cs
index 000d429173e..7d2a2bad563 100644
--- a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementation.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementation.cs
@@ -55,7 +55,7 @@ protected override void OnMessageReceived(ISceneCommunicationPipe.DecodedMessage
totalLength += filteredLength;
}
// Filter RES_CRDT_STATE messages before receiving
- else if (commsMessageType == CommsMessageType.RES_CRDT_STATE)
+ else if (commsMessageType == CommsMessageType.ResCRDTState)
{
int filteredLength = FilterCRDTStateMessage(sourceData, filteredUnbounded, isTrustedSource);
totalLength += filteredLength;
diff --git a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementationBase.cs b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementationBase.cs
index d41c9c8f975..bbbf2eba7bb 100644
--- a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementationBase.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/CommunicationsControllerAPIImplementationBase.cs
@@ -19,8 +19,8 @@ public abstract class CommunicationsControllerAPIImplementationBase : ICommunica
// https://github.com/decentraland/js-sdk-toolchain/blob/c8695cd9b94e87ad567520089969583d9d36637f/packages/@dcl/sdk/src/network/binary-message-bus.ts#L3-L7
protected enum CommsMessageType {
CRDT = 1,
- REQ_CRDT_STATE = 2, // Special signal to receive CRDT State from a peer
- RES_CRDT_STATE = 3 // Special signal to send CRDT State to a peer
+ ReqCRDTState = 2, // Special signal to receive CRDT State from a peer
+ ResCRDTState = 3 // Special signal to send CRDT State to a peer
}
private readonly List eventsToProcess = new ();
@@ -71,9 +71,9 @@ public void SendBinary(IReadOnlyList broadcastData, string? r
{
byte firstByte = poolable.Span[0];
- ISceneCommunicationPipe.ConnectivityAssertiveness assertiveness = firstByte == (int)CommsMessageType.REQ_CRDT_STATE
- ? ISceneCommunicationPipe.ConnectivityAssertiveness.DELIVERY_ASSERTED
- : ISceneCommunicationPipe.ConnectivityAssertiveness.DROP_IF_NOT_CONNECTED;
+ ISceneCommunicationPipe.ConnectivityAssertiveness assertiveness = firstByte == (int)CommsMessageType.ReqCRDTState
+ ? ISceneCommunicationPipe.ConnectivityAssertiveness.DeliveryAsserted
+ : ISceneCommunicationPipe.ConnectivityAssertiveness.DropIfNotConnected;
// Filter CRDT messages before sending
if (firstByte == (int)CommsMessageType.CRDT)
@@ -85,7 +85,7 @@ public void SendBinary(IReadOnlyList broadcastData, string? r
}
// Filter RES_CRDT_STATE messages before sending
- if (firstByte == (int)CommsMessageType.RES_CRDT_STATE)
+ if (firstByte == (int)CommsMessageType.ResCRDTState)
{
Span filtered = stackalloc byte[poolable.Memory.Span.Length];
int filteredLength = FilterCRDTStateMessage(poolable.Memory.Span, filtered, isTrustedSource: true);
diff --git a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/SDKMessageBus/SDKMessageBusCommsAPIImplementation.cs b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/SDKMessageBus/SDKMessageBusCommsAPIImplementation.cs
index a36daa2fcee..7ebaa4b3172 100644
--- a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/SDKMessageBus/SDKMessageBusCommsAPIImplementation.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/SDKMessageBus/SDKMessageBusCommsAPIImplementation.cs
@@ -25,7 +25,7 @@ public void ClearMessages()
public void Send(string data)
{
byte[] dataBytes = Encoding.UTF8.GetBytes(data);
- EncodeAndSendMessage(ISceneCommunicationPipe.MsgType.String, dataBytes, ISceneCommunicationPipe.ConnectivityAssertiveness.DROP_IF_NOT_CONNECTED, null);
+ EncodeAndSendMessage(ISceneCommunicationPipe.MsgType.String, dataBytes, ISceneCommunicationPipe.ConnectivityAssertiveness.DropIfNotConnected, null);
}
protected override void OnMessageReceived(ISceneCommunicationPipe.DecodedMessage message)
diff --git a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs
index 5f6647457bf..8d400ed08b0 100644
--- a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/Communications/SceneCommunicationPipe.cs
@@ -28,7 +28,7 @@ public SceneCommunicationPipe(IMessagePipesHub messagePipesHub, IGateKeeperScene
{
this.sceneRoom = sceneRoom;
messagePipe = messagePipesHub.ScenePipe();
- messagePipe.Subscribe(Packet.MessageOneofCase.Scene, InvokeSubscriber, IMessagePipe.ThreadStrict.ORIGIN_THREAD);
+ messagePipe.Subscribe(Packet.MessageOneofCase.Scene, InvokeSubscriber, IMessagePipe.ThreadStrict.OriginThread);
}
private void InvokeSubscriber(ReceivedMessage message)
diff --git a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/GlobalWorldActions.cs b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/GlobalWorldActions.cs
index 539941804c3..5160297bafe 100644
--- a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/GlobalWorldActions.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/GlobalWorldActions.cs
@@ -102,7 +102,7 @@ public void RotateCamera(Vector3? newCameraTarget, Vector3 newPlayerPosition)
public void TriggerEmote(URN urn, bool isLooping, AvatarEmoteMask mask)
{
// If it's just Add() there are inconsistencies when the intent is processed at CharacterEmoteSystem for rapidly triggered emotes...
- world.AddOrSet(playerEntity, new CharacterEmoteIntent { EmoteId = urn, Spatial = true, TriggerSource = TriggerSource.SCENE, Mask = mask });
+ world.AddOrSet(playerEntity, new CharacterEmoteIntent { EmoteId = urn, Spatial = true, TriggerSource = TriggerSource.Scene, Mask = mask });
}
public async UniTask<(URN Urn, bool IsLooping)?> TriggerSceneEmoteAsync(ISceneData sceneData, string src, string hash, bool loop, AvatarEmoteMask mask,
diff --git a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/RestrictedActionsAPIImplementation.cs b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/RestrictedActionsAPIImplementation.cs
index 32f001023ed..027b4d20213 100644
--- a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/RestrictedActionsAPIImplementation.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/RestrictedActionsAPIImplementation.cs
@@ -180,7 +180,7 @@ private void TriggerMaskedEmoteOnSceneWorld(CommunicationData.URLHelpers.URN urn
{
EmoteId = urn,
Spatial = true,
- TriggerSource = TriggerSource.SCENE,
+ TriggerSource = TriggerSource.Scene,
Mask = mask,
});
}
diff --git a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/Tests/GlobalWorldActionsShould.cs b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/Tests/GlobalWorldActionsShould.cs
index 0e97ede6ac4..a0b790f4ffc 100644
--- a/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/Tests/GlobalWorldActionsShould.cs
+++ b/Explorer/Assets/DCL/Infrastructure/CrdtEcsBridge/JsModulesImplementation/RestrictedActions/Tests/GlobalWorldActionsShould.cs
@@ -198,7 +198,7 @@ public void AddIntentAndSendMessageWhenAvatarVisible()
var intent = world.Get(playerEntity);
Assert.AreEqual(emoteUrn, intent.EmoteId);
Assert.IsTrue(intent.Spatial);
- Assert.AreEqual(TriggerSource.SCENE, intent.TriggerSource);
+ Assert.AreEqual(TriggerSource.Scene, intent.TriggerSource);
}
[Test]
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/SceneBoundsChecker/ConfigureSceneMaterial.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/SceneBoundsChecker/ConfigureSceneMaterial.cs
index 7c6b86ed374..cb62949aa8c 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/SceneBoundsChecker/ConfigureSceneMaterial.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/SceneBoundsChecker/ConfigureSceneMaterial.cs
@@ -19,7 +19,7 @@ public static class ConfigureSceneMaterial
///
/// When enabled, forces backface culling on all scene materials.
- /// Set this from FeaturesRegistry.IsEnabled(FeatureId.FORCE_BACKFACE_CULLING).
+ /// Set this from FeaturesRegistry.IsEnabled(FeatureId.ForceBackfaceCulling).
///
public static bool forceBackfaceCullingEnabled { get; set; }
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/GetAssetBundleIntention.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/GetAssetBundleIntention.cs
index 5ecb8f2d660..8053c059364 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/GetAssetBundleIntention.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/GetAssetBundleIntention.cs
@@ -46,7 +46,7 @@ public struct GetAssetBundleIntention : ILoadingIntention, IEquatable
public CancellationTokenSource CancellationTokenSource => CommonArguments.CancellationTokenSource;
- public static GetAssetBundleIntention Create(Type? expectedAssetType, string hash, string name, AssetSource permittedSources = AssetSource.ALL,
+ public static GetAssetBundleIntention Create(Type? expectedAssetType, string hash, string name, AssetSource permittedSources = AssetSource.All,
URLSubdirectory customEmbeddedSubDirectory = default) =>
new (expectedAssetType, hash: hash, name: name, permittedSources: permittedSources, customEmbeddedSubDirectory: customEmbeddedSubDirectory);
- public static GetAssetBundleIntention FromHash(string hash, Type? expectedAssetType = null, AssetSource permittedSources = AssetSource.ALL,
+ public static GetAssetBundleIntention FromHash(string hash, Type? expectedAssetType = null, AssetSource permittedSources = AssetSource.All,
URLSubdirectory customEmbeddedSubDirectory = default, CancellationTokenSource cancellationTokenSource = null,
AssetBundleManifestVersion? assetBundleManifestVersion = null, string parentEntityID = "", bool isDependency = false, bool lookForDependencies = false) =>
new (expectedAssetType, hash: hash, assetBundleVersion: assetBundleManifestVersion, parentEntityID: parentEntityID, permittedSources: permittedSources, customEmbeddedSubDirectory: customEmbeddedSubDirectory, isDependency: isDependency, lookForDependencies: lookForDependencies, cancellationTokenSource: cancellationTokenSource);
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/PrepareAssetBundleLoadingParametersSystemBase.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/PrepareAssetBundleLoadingParametersSystemBase.cs
index a527a6dbb6c..93c90d8e117 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/PrepareAssetBundleLoadingParametersSystemBase.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/PrepareAssetBundleLoadingParametersSystemBase.cs
@@ -34,14 +34,14 @@ protected void PrepareCommonArguments(in Entity entity, ref GetAssetBundleIntent
if (state.Value != StreamableLoadingState.Status.NotStarted) return;
// Remove not supported flags
- assetBundleIntention.RemovePermittedSource(AssetSource.ADDRESSABLE); // addressables are not implemented
+ assetBundleIntention.RemovePermittedSource(AssetSource.Addressable); // addressables are not implemented
// First priority
- if (EnumUtils.HasFlag(assetBundleIntention.CommonArguments.PermittedSources, AssetSource.EMBEDDED))
+ if (EnumUtils.HasFlag(assetBundleIntention.CommonArguments.PermittedSources, AssetSource.Embedded))
{
CommonLoadingArguments ca = assetBundleIntention.CommonArguments;
ca.Attempts = 1;
- ca.CurrentSource = AssetSource.EMBEDDED;
+ ca.CurrentSource = AssetSource.Embedded;
ca.URL = GetStreamingAssetsUrl(assetBundleIntention.Hash, assetBundleIntention.CommonArguments.CustomEmbeddedSubDirectory);
assetBundleIntention.CommonArguments = ca;
@@ -49,7 +49,7 @@ protected void PrepareCommonArguments(in Entity entity, ref GetAssetBundleIntent
}
// Second priority
- if (EnumUtils.HasFlag(assetBundleIntention.CommonArguments.PermittedSources, AssetSource.WEB))
+ if (EnumUtils.HasFlag(assetBundleIntention.CommonArguments.PermittedSources, AssetSource.Web))
{
if (assetBundleIntention.AssetBundleManifestVersion == null || assetBundleIntention.AssetBundleManifestVersion.assetBundleManifestRequestFailed)
{
@@ -62,7 +62,7 @@ protected void PrepareCommonArguments(in Entity entity, ref GetAssetBundleIntent
CommonLoadingArguments ca = assetBundleIntention.CommonArguments;
ca.Attempts = StreamableLoadingDefaults.ATTEMPTS_COUNT;
ca.Timeout = StreamableLoadingDefaults.TIMEOUT;
- ca.CurrentSource = AssetSource.WEB;
+ ca.CurrentSource = AssetSource.Web;
assetBundleIntention.Hash = assetBundleIntention.AssetBundleManifestVersion.CheckCasing(assetBundleIntention.Hash);
ca.URL = GetAssetBundleURL(assetBundleIntention.AssetBundleManifestVersion.HasHashInPath(), assetBundleIntention.Hash, assetBundleIntention.ParentEntityID, assetBundleIntention.AssetBundleManifestVersion.GetAssetBundleManifestVersion());
assetBundleIntention.CommonArguments = ca;
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/Tests/LoadAssetBundlePartialSystemShould.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/Tests/LoadAssetBundlePartialSystemShould.cs
index 29419f65ac2..815e19f78e0 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/Tests/LoadAssetBundlePartialSystemShould.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/Tests/LoadAssetBundlePartialSystemShould.cs
@@ -137,7 +137,7 @@ private ABPromise NewABPromiseRemoteAsset(int index)
private ABPromise NewABPromise()
{
- var intention = GetAssetBundleIntention.FromHash("bafkreid3xecd44iujaz5qekbdrt5orqdqj3wivg5zc5mya3zkorjhyrkda", typeof(GameObject), permittedSources: AssetSource.WEB);
+ var intention = GetAssetBundleIntention.FromHash("bafkreid3xecd44iujaz5qekbdrt5orqdqj3wivg5zc5mya3zkorjhyrkda", typeof(GameObject), permittedSources: AssetSource.Web);
var partition = PartitionComponent.TOP_PRIORITY;
var assetPromise = ABPromise.Create(world, intention, partition);
world.Get(assetPromise.Entity).SetAllowed(Substitute.For());
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs
index 49c658a1028..49b4ecbb6b1 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs
@@ -34,7 +34,7 @@ public void LoadFromEmbeddedFirst()
{
LogAssert.ignoreFailingMessages = true;
- var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "TEST", permittedSources: AssetSource.EMBEDDED | AssetSource.WEB);
+ var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "TEST", permittedSources: AssetSource.Embedded | AssetSource.Web);
Entity e = world.Create(intent, new StreamableLoadingState());
@@ -43,7 +43,7 @@ public void LoadFromEmbeddedFirst()
intent = world.Get(e);
Assert.That(intent.CommonArguments.Attempts, Is.EqualTo(1));
- Assert.That(intent.CommonArguments.CurrentSource, Is.EqualTo(AssetSource.EMBEDDED));
+ Assert.That(intent.CommonArguments.CurrentSource, Is.EqualTo(AssetSource.Embedded));
Assert.That(intent.CommonArguments.URL, Is.EqualTo(path + "TEST"));
}
@@ -55,14 +55,14 @@ public void LoadFromWebWithOldPath()
sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, version, new[] { "abcd" }, "hash", "04_10_2024"));
- var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB);
+ var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.Web);
Entity e = world.Create(intent, new StreamableLoadingState());
system.Update(0);
intent = world.Get(e);
Assert.That(intent.CommonArguments.Attempts, Is.EqualTo(StreamableLoadingDefaults.ATTEMPTS_COUNT));
- Assert.That(intent.CommonArguments.CurrentSource, Is.EqualTo(AssetSource.WEB));
+ Assert.That(intent.CommonArguments.CurrentSource, Is.EqualTo(AssetSource.Web));
Assert.That(intent.CommonArguments.URL, Is.EqualTo($"http://www.fakepath.com/{version}/abcd"));
Assert.That(intent.cacheHash, Is.Not.Null);
}
@@ -74,14 +74,14 @@ public void LoadFromWebWithNewPath()
string version = "v" + SceneAssetBundleManifest.ASSET_BUNDLE_VERSION_REQUIRES_HASH;
sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, version, new[] { "abcd" }, "hash", "04_10_2024"));
- var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB);
+ var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.Web);
Entity e = world.Create(intent, new StreamableLoadingState());
system.Update(0);
intent = world.Get(e);
Assert.That(intent.CommonArguments.Attempts, Is.EqualTo(StreamableLoadingDefaults.ATTEMPTS_COUNT));
- Assert.That(intent.CommonArguments.CurrentSource, Is.EqualTo(AssetSource.WEB));
+ Assert.That(intent.CommonArguments.CurrentSource, Is.EqualTo(AssetSource.Web));
Assert.That(intent.CommonArguments.URL, Is.EqualTo($"http://www.fakepath.com/{version}/hash/abcd"));
Assert.That(intent.cacheHash, Is.Not.Null);
}
@@ -93,7 +93,7 @@ public void FailIfAbsentInManifestOldHash()
sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, "v" + (SceneAssetBundleManifest.ASSET_BUNDLE_VERSION_REQUIRES_HASH - 1), Array.Empty(), "hash", "04_10_2024"));
- var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB);
+ var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.Web);
Entity e = world.Create(intent, new StreamableLoadingState());
system.Update(0);
@@ -111,7 +111,7 @@ public void FailIfAbsentInManifestNewHash()
sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, "v" + (SceneAssetBundleManifest.ASSET_BUNDLE_VERSION_REQUIRES_HASH), Array.Empty(), "hash", "04_10_2024"));
- var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB);
+ var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.Web);
Entity e = world.Create(intent, new StreamableLoadingState());
system.Update(0);
@@ -128,7 +128,7 @@ public void ReturnSameCacheValuesForDifferentVersions()
//First, we simulate creation of a scene and the resolving of one asset budnle
string version = "v" + SceneAssetBundleManifest.ASSET_BUNDLE_VERSION_REQUIRES_HASH;
sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, version, new[] { "abcd" }, "scene_hash_1", "04_10_2024"));
- var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB);
+ var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.Web);
Entity entity1 = world.Create(intent, new StreamableLoadingState());
system.Update(0);
intent = world.Get(entity1);
@@ -138,7 +138,7 @@ public void ReturnSameCacheValuesForDifferentVersions()
//Now, we simulate another scene, that has a different asset bundle version
version = "v" + (SceneAssetBundleManifest.ASSET_BUNDLE_VERSION_REQUIRES_HASH + 1);
sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, version, new[] { "abcd" }, "scene_hash_1", "04_10_2024"));
- var intent2 = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB);
+ var intent2 = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.Web);
Entity entity2 = world.Create(intent2, new StreamableLoadingState());
system.Update(0);
intent2 = world.Get(entity2);
@@ -154,7 +154,7 @@ public void ReturnSameCacheValuesForScenes()
//First, we simulate creation of a scene and the resolving of one asset budnle
string version = "v" + SceneAssetBundleManifest.ASSET_BUNDLE_VERSION_REQUIRES_HASH;
sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, version, new[] { "abcd" }, "scene_hash_1", "04_10_2024"));
- var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB);
+ var intent = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.Web);
Entity entity1 = world.Create(intent, new StreamableLoadingState());
system.Update(0);
intent = world.Get(entity1);
@@ -163,7 +163,7 @@ public void ReturnSameCacheValuesForScenes()
//Now, we simulate another scene, that has a differente scene hash but same version
sceneData.AssetBundleManifest.Returns(new SceneAssetBundleManifest(FAKE_AB_PATH, version, new[] { "abcd" }, "scene_hash_2", "04_10_2024"));
- var intent2 = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.WEB);
+ var intent2 = GetAssetBundleIntention.FromHash(typeof(GameObject), "abcd", permittedSources: AssetSource.Web);
Entity entity2 = world.Create(intent2, new StreamableLoadingState());
system.Update(0);
intent2 = world.Get(entity2);
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/CommonLoadingArguments.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/CommonLoadingArguments.cs
index 9ba041fe7fc..e83c7fa65c1 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/CommonLoadingArguments.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/CommonLoadingArguments.cs
@@ -32,8 +32,8 @@ public struct CommonLoadingArguments
public CommonLoadingArguments(URLAddress url, URLSubdirectory customEmbeddedSubDirectory = default,
int timeout = StreamableLoadingDefaults.TIMEOUT,
int attempts = StreamableLoadingDefaults.ATTEMPTS_COUNT,
- AssetSource permittedSources = AssetSource.WEB,
- AssetSource currentSource = AssetSource.WEB,
+ AssetSource permittedSources = AssetSource.Web,
+ AssetSource currentSource = AssetSource.Web,
CancellationTokenSource? cancellationTokenSource = null)
{
URL = url;
@@ -51,8 +51,8 @@ public CommonLoadingArguments(URLAddress url, URLSubdirectory customEmbeddedSubD
public CommonLoadingArguments(string url, URLSubdirectory customEmbeddedSubDirectory = default,
int timeout = StreamableLoadingDefaults.TIMEOUT,
int attempts = StreamableLoadingDefaults.ATTEMPTS_COUNT,
- AssetSource permittedSources = AssetSource.WEB,
- AssetSource currentSource = AssetSource.WEB,
+ AssetSource permittedSources = AssetSource.Web,
+ AssetSource currentSource = AssetSource.Web,
CancellationTokenSource cancellationTokenSource = null) :
this(URLAddress.FromString(url), customEmbeddedSubDirectory, timeout, attempts, permittedSources, currentSource, cancellationTokenSource) { }
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/ILoadingIntention.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/ILoadingIntention.cs
index 0b121ab2a01..aabd65d549f 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/ILoadingIntention.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/ILoadingIntention.cs
@@ -70,7 +70,7 @@ public static void SetSources(this ref T loadingIntention, AssetSource permit
/// Only assets downloaded from web can be cached on disk, otherwise the asset is already stored locally on disk
///
public static bool IsQualifiedForDiskCache(this ref T loadingIntention) where T: struct, ILoadingIntention =>
- loadingIntention.CommonArguments.CurrentSource == AssetSource.WEB;
+ loadingIntention.CommonArguments.CurrentSource == AssetSource.Web;
public static bool AreUrlEquals(this TIntention intention, TIntention other) where TIntention: struct, ILoadingIntention =>
intention.CommonArguments.URL == other.CommonArguments.URL;
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/SubIntention.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/SubIntention.cs
index 98f32991555..f10a9d587fd 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/SubIntention.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Common/Components/SubIntention.cs
@@ -10,7 +10,7 @@ public struct SubIntention : ILoadingIntention
{
public SubIntention(CommonLoadingArguments commonArguments)
{
- commonArguments.PermittedSources = AssetSource.NONE;
+ commonArguments.PermittedSources = AssetSource.None;
CommonArguments = commonArguments;
}
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Tests/LoadSystemBaseAbandonedResultShould.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Tests/LoadSystemBaseAbandonedResultShould.cs
index 868157dcd3f..336f0f67dd4 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Tests/LoadSystemBaseAbandonedResultShould.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Tests/LoadSystemBaseAbandonedResultShould.cs
@@ -45,8 +45,8 @@ public async Task DisposeAbandonedResultWhenIntentionCancelledMidFlow()
CommunicationData.URLHelpers.URLAddress.EMPTY,
cancellationTokenSource: cts,
attempts: 1,
- permittedSources: AssetSource.EMBEDDED,
- currentSource: AssetSource.EMBEDDED),
+ permittedSources: AssetSource.Embedded,
+ currentSource: AssetSource.Embedded),
};
var promise = AssetPromise.Create(world, intention, PartitionComponent.TOP_PRIORITY);
diff --git a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Tests/LoadSystemBaseShould.cs b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Tests/LoadSystemBaseShould.cs
index e0ea19b7436..d4b474948a1 100644
--- a/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Tests/LoadSystemBaseShould.cs
+++ b/Explorer/Assets/DCL/Infrastructure/ECS/Unity/StreamableLoading/Tests/LoadSystemBaseShould.cs
@@ -114,7 +114,7 @@ public async Task ConcludeFailIfNotFound()
public async Task RemoveCurrentSourceFromPermittedSources()
{
TIntention intent = CreateSuccessIntention();
- intent.SetSources(AssetSource.EMBEDDED, AssetSource.EMBEDDED);
+ intent.SetSources(AssetSource.Embedded, AssetSource.Embedded);
promise = AssetPromise.Create(world, intent, PartitionComponent.TOP_PRIORITY);
ForceAllowed();
@@ -123,7 +123,7 @@ public async Task RemoveCurrentSourceFromPermittedSources()
system.Update(0);
await promise.ToUniTaskWithoutDestroyAsync(world, cancellationToken: promise.LoadingIntention.CommonArguments.CancellationToken);
- Assert.AreEqual(AssetSource.NONE, world.Get(promise.Entity).CommonArguments.PermittedSources);
+ Assert.AreEqual(AssetSource.None, world.Get(promise.Entity).CommonArguments.PermittedSources);
}
[Test]
diff --git a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Bootstraper.cs b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Bootstraper.cs
index 0d89dbe1791..d01edbec028 100644
--- a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Bootstraper.cs
+++ b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Bootstraper.cs
@@ -226,7 +226,7 @@ public void InitializeFeaturesRegistry()
// Gate the v49 deps-digest cache-keying scheme behind the feature flag. Off by default means every
// manifest reports SupportsDepsDigests() == false and the entire pipeline takes the legacy code path.
- AssetBundleManifestVersion.DepsDigestKeyingEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.AB_DEPS_DIGEST_CACHE_KEY);
+ AssetBundleManifestVersion.DepsDigestKeyingEnabled = FeaturesRegistry.Instance.IsEnabled(FeatureId.ABDepsDigestCacheKey);
}
public GlobalWorld CreateGlobalWorld(
diff --git a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/CommsContainer.cs b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/CommsContainer.cs
index 8b09410fc99..84ba715c57a 100644
--- a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/CommsContainer.cs
+++ b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/CommsContainer.cs
@@ -121,7 +121,7 @@ public static CommsContainer Create(
SceneRoomLogMetaDataSource playSceneMetaDataSource = new SceneRoomMetaDataSource(staticContainer.RealmData, staticContainer.CharacterContainer.Transform, globalWorld, isolateScenesCommunication, bootstrapContainer.DecentralandUrlsSource).WithLog();
SceneRoomLogMetaDataSource localDevelopmentMetaDataSource = new LocalSceneDevelopmentSceneRoomMetaDataSource(staticContainer.WebRequestsContainer.WebRequestController).WithLog();
- Option hardwareFingerprintProvider = FeaturesRegistry.Instance.IsEnabled(FeatureId.HARDWARE_FINGERPRINT)
+ Option hardwareFingerprintProvider = FeaturesRegistry.Instance.IsEnabled(FeatureId.HardwareFingerprint)
? Option.Some(new HardwareFingerprintProvider())
: Option.None;
diff --git a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/DynamicWorldContainer.cs b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/DynamicWorldContainer.cs
index e20941515a7..31d7a05c89e 100644
--- a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/DynamicWorldContainer.cs
+++ b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/DynamicWorldContainer.cs
@@ -238,7 +238,7 @@ public override void Dispose()
IFriendsEventBus friendsEventBus = new DefaultFriendsEventBus();
- IUserBlockingCache userBlockingCache = FeaturesRegistry.Instance.IsEnabled(FeatureId.FRIENDS_USER_BLOCKING)
+ IUserBlockingCache userBlockingCache = FeaturesRegistry.Instance.IsEnabled(FeatureId.FriendsUserBlocking)
? new UserBlockingCache(friendsEventBus)
: new NullUserBlockingCache();
@@ -320,10 +320,10 @@ await LODContainer
// Deferred: CommunityDataService needs chat history (only available now) but is owned by CommunitiesContainer.
CommunityDataService communitiesDataService = communitiesContainer.CreateDataService(chatContainer.ChatHistory, uiShellContainer.MvcManager, identityCache);
- bool includeCameraReel = FeaturesRegistry.Instance.IsEnabled(FeatureId.CAMERA_REEL);
- bool includeFriends = FeaturesRegistry.Instance.IsEnabled(FeatureId.FRIENDS);
- bool includeMarketplaceCredits = FeaturesRegistry.Instance.IsEnabled(FeatureId.MARKETPLACE_CREDITS);
- bool includeBannedUsersFromScene = FeaturesRegistry.Instance.IsEnabled(FeatureId.BANNED_USERS_FROM_SCENE);
+ bool includeCameraReel = FeaturesRegistry.Instance.IsEnabled(FeatureId.CameraReel);
+ bool includeFriends = FeaturesRegistry.Instance.IsEnabled(FeatureId.Friends);
+ bool includeMarketplaceCredits = FeaturesRegistry.Instance.IsEnabled(FeatureId.MarketplaceCredits);
+ bool includeBannedUsersFromScene = FeaturesRegistry.Instance.IsEnabled(FeatureId.BannedUsersFromScene);
var moderationDataProvider = new ModerationDataProvider(staticContainer.WebRequestsContainer.WebRequestController, bootstrapContainer.DecentralandUrlsSource);
@@ -439,7 +439,7 @@ await MapRendererContainer
creditsChainConfig,
identityCache,
dynamicWorldDependencies.CompositeWeb3Provider,
- FeaturesRegistry.Instance.IsEnabled(FeatureId.CREDITS_WEARABLE_PURCHASE) && FeaturesRegistry.Instance.IsEnabled(FeatureId.USER_CREDITS));
+ FeaturesRegistry.Instance.IsEnabled(FeatureId.CreditsWearablePurchase) && FeaturesRegistry.Instance.IsEnabled(FeatureId.UserCredits));
var cameraReelContainer = CameraReelContainer.Create(staticContainer.WebRequestsContainer.WebRequestController, bootstrapContainer.DecentralandUrlsSource, identityCache.Identity?.Address);
var userCalendar = new GoogleUserCalendar(webBrowser);
@@ -695,7 +695,7 @@ await MapRendererContainer
assetsProvisioner,
uiShellContainer.MvcManager,
uiShellContainer.Cursor,
- realmUrl => chatContainer.ChatMessagesBus.SendWithUtcNowTimestamp(ChatChannel.NEARBY_CHANNEL, $"/{ChatCommandsUtils.COMMAND_GOTO} {realmUrl}", ChatMessageOrigin.RESTRICTED_ACTION_API)),
+ realmUrl => chatContainer.ChatMessagesBus.SendWithUtcNowTimestamp(ChatChannel.NEARBY_CHANNEL, $"/{ChatCommandsUtils.COMMAND_GOTO} {realmUrl}", ChatMessageOrigin.RestrictedActionApi)),
new NftPromptPlugin(assetsProvisioner, webBrowser, uiShellContainer.MvcManager, nftInfoAPIClient, staticContainer.ImageControllerProvider, uiShellContainer.Cursor),
staticContainer.CharacterContainer.CreateGlobalPlugin(),
staticContainer.QualityContainer.CreatePlugin(),
@@ -789,7 +789,7 @@ await MapRendererContainer
dynamicWorldDependencies.CompositeWeb3Provider));
// ReSharper disable once MethodHasAsyncOverloadWithCancellation
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.STOP_ON_DUPLICATE_IDENTITY))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.StopOnDuplicateIdentity))
globalPlugins.Add(new DuplicateIdentityPlugin(commsContainer.RoomHub, uiShellContainer.MvcManager, assetsProvisioner));
// No comms/internet popup while developing against a local scene.
@@ -802,7 +802,7 @@ await MapRendererContainer
bootstrapContainer.DecentralandUrlsSource));
// ReSharper disable once MethodHasAsyncOverloadWithCancellation
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.VOICE_CHAT))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.VoiceChat))
globalPlugins.Add(
new VoiceChatPlugin(
commsContainer.RoomHub,
@@ -840,10 +840,10 @@ await MapRendererContainer
globalPlugins.Add(lodContainer.RoadPlugin);
}
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.MCP_SERVER))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.McpServer))
globalPlugins.Add(new McpServerPlugin(
appArgs,
- new GlobalWorldActions(globalWorld, playerEntity, localSceneDevelopment, bootstrapContainer.UseRemoteAssetBundles, FeaturesRegistry.Instance.IsEnabled(FeatureId.SELF_PREVIEW_BUILDER_COLLECTIONS)),
+ new GlobalWorldActions(globalWorld, playerEntity, localSceneDevelopment, bootstrapContainer.UseRemoteAssetBundles, FeaturesRegistry.Instance.IsEnabled(FeatureId.SelfPreviewBuilderCollections)),
chatContainer.ChatMessagesBus,
staticContainer.ScenesCache,
commsContainer.CurrentSceneInfo,
@@ -857,7 +857,7 @@ await MapRendererContainer
globalWorld,
localSceneDevelopment));
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.LOCAL_SCENE_DEVELOPMENT) || FeaturesRegistry.Instance.IsEnabled(FeatureId.SELF_PREVIEW_BUILDER_COLLECTIONS))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.LocalSceneDevelopment) || FeaturesRegistry.Instance.IsEnabled(FeatureId.SelfPreviewBuilderCollections))
globalPlugins.Add(new GlobalGLTFLoadingPlugin(staticContainer.WebRequestsContainer.WebRequestController, staticContainer.RealmData, wearableContainer.BuilderContentURL.Value, localSceneDevelopment, staticContainer.ComponentsContainer.ComponentPoolsRegistry.RootContainerTransform()));
globalPlugins.AddRange(staticContainer.SharedPlugins);
diff --git a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/GlobalWorldFactory.cs b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/GlobalWorldFactory.cs
index d33ee5e0a7b..4d5ccbd5562 100644
--- a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/GlobalWorldFactory.cs
+++ b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/GlobalWorldFactory.cs
@@ -122,7 +122,7 @@ public GlobalWorldFactory(in StaticContainer staticContainer,
this.hybridSceneParams = hybridSceneParams;
this.currentSceneInfo = currentSceneInfo;
this.lodCache = lodCache;
- this.localSceneDevelopment = FeaturesRegistry.Instance.IsEnabled(FeatureId.LOCAL_SCENE_DEVELOPMENT);
+ this.localSceneDevelopment = FeaturesRegistry.Instance.IsEnabled(FeatureId.LocalSceneDevelopment);
this.sceneReadinessReportQueue = sceneReadinessReportQueue;
this.sceneRoomStatus = sceneRoomStatus;
this.world = world;
@@ -132,7 +132,7 @@ public GlobalWorldFactory(in StaticContainer staticContainer,
this.useRemoteAssetBundles = useRemoteAssetBundles;
this.roadAssetPool = roadAssetPool;
this.sceneLoadingLimit = sceneLoadingLimit;
- this.isBuilderCollectionPreview = FeaturesRegistry.Instance.IsEnabled(FeatureId.SELF_PREVIEW_BUILDER_COLLECTIONS);
+ this.isBuilderCollectionPreview = FeaturesRegistry.Instance.IsEnabled(FeatureId.SelfPreviewBuilderCollections);
this.entitiesAnalytics = entitiesAnalytics;
memoryBudget = staticContainer.SingletonSharedDependencies.MemoryBudget;
diff --git a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/InitialRealm.cs b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/InitialRealm.cs
index 89c0f434ac8..8ae342ed188 100644
--- a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/InitialRealm.cs
+++ b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/InitialRealm.cs
@@ -3,7 +3,7 @@ namespace Global.Dynamic
public enum InitialRealm
{
GenesisCity,
- SDK,
+ Sdk,
Goerli,
StreamingWorld,
TestScenes,
diff --git a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Landscapes/Landscape.cs b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Landscapes/Landscape.cs
index 279d2155c14..04c8e488b78 100644
--- a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Landscapes/Landscape.cs
+++ b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Landscapes/Landscape.cs
@@ -66,12 +66,12 @@ await genesisTerrain.GenerateGenesisTerrainAndShowAsync(
? await GenerateStaticScenesTerrainAsync(landscapeLoadReport, ct)
: await GenerateFixedScenesTerrainAsync(realmController.RealmData.WorldManifest, landscapeLoadReport, ct);
- if (result != WorldsTerrainResult.GENERATED)
+ if (result != WorldsTerrainResult.Generated)
{
worldsTerrain.Hide();
landscapeLoadReport.SetProgress(1f);
- return result == WorldsTerrainResult.DISABLED
+ return result == WorldsTerrainResult.Disabled
? EnumResult.SuccessResult()
: EnumResult.ErrorResult(LandscapeError.TerrainDataUnavailable);
}
@@ -104,20 +104,20 @@ public Result IsParcelInsideTerrain(Vector2Int parcel, bool isLocal)
private async UniTask GenerateStaticScenesTerrainAsync(AsyncLoadProcessReport landscapeLoadReport, CancellationToken ct)
{
if (!worldsTerrain.IsInitialized)
- return WorldsTerrainResult.DISABLED;
+ return WorldsTerrainResult.Disabled;
SceneDefinitions? staticScenesEntityDefinitions = await realmController.WaitForStaticScenesEntityDefinitionsAsync(ct);
if (!staticScenesEntityDefinitions.HasValue)
{
ReportHub.LogWarning(ReportCategory.LANDSCAPE, "Static scenes definitions are unavailable, worlds terrain generation skipped");
- return WorldsTerrainResult.UNAVAILABLE;
+ return WorldsTerrainResult.Unavailable;
}
List sceneDefinitions = staticScenesEntityDefinitions.Value.Value;
if (IsLandscapeTerrainDisabledByScene(sceneDefinitions))
- return WorldsTerrainResult.DISABLED;
+ return WorldsTerrainResult.Disabled;
int parcelsAmount = sceneDefinitions.Count;
@@ -131,22 +131,22 @@ private async UniTask GenerateStaticScenesTerrainAsync(Asyn
worldsTerrain.GenerateTerrain(parcels, landscapeLoadReport);
}
- return WorldsTerrainResult.GENERATED;
+ return WorldsTerrainResult.Generated;
}
private async UniTask GenerateFixedScenesTerrainAsync(WorldManifest worldManifest, AsyncLoadProcessReport landscapeLoadReport, CancellationToken ct)
{
if (!worldsTerrain.IsInitialized)
- return WorldsTerrainResult.DISABLED;
+ return WorldsTerrainResult.Disabled;
List sceneEntityDefinitions = await realmController.WaitForFixedScenePromisesAsync(ct);
if (IsLandscapeTerrainDisabledByScene(sceneEntityDefinitions))
- return WorldsTerrainResult.DISABLED;
+ return WorldsTerrainResult.Disabled;
if (!worldManifest.IsEmpty)
{
worldsTerrain.GenerateTerrain(worldManifest.GetOccupiedParcels(), landscapeLoadReport);
- return WorldsTerrainResult.GENERATED;
+ return WorldsTerrainResult.Generated;
}
var parcelsAmount = 0;
@@ -165,7 +165,7 @@ private async UniTask GenerateFixedScenesTerrainAsync(World
worldsTerrain.GenerateTerrain(parcels, landscapeLoadReport);
}
- return WorldsTerrainResult.GENERATED;
+ return WorldsTerrainResult.Generated;
}
private static bool IsLandscapeTerrainDisabledByScene(IReadOnlyList sceneDefinitions) =>
@@ -174,13 +174,13 @@ private static bool IsLandscapeTerrainDisabledByScene(IReadOnlyListTerrain was generated and is shown.
- GENERATED,
+ Generated,
/// Terrain is intentionally off: generator not initialized or the scene opted out via scene.json.
- DISABLED,
+ Disabled,
/// Scene definitions required to build the terrain could not be loaded.
- UNAVAILABLE,
+ Unavailable,
}
}
}
diff --git a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/MainSceneLoader.cs b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/MainSceneLoader.cs
index 65a49807dff..cfac566b9ba 100644
--- a/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/MainSceneLoader.cs
+++ b/Explorer/Assets/DCL/Infrastructure/Global/Dynamic/MainSceneLoader.cs
@@ -347,7 +347,7 @@ await bootstrap.InitializeFeatureFlagsAsync(bootstrapContainer.IdentityCache!.Id
var specResults = await VerifyMinimumHardwareRequirementMetAsync(applicationParametersParser, bootstrapContainer.WebBrowser, bootstrapContainer.Analytics.Controller, ct);
- if (FeaturesRegistry.Instance.IsEnabled(FeatureId.CHECK_DISK_SPACE))
+ if (FeaturesRegistry.Instance.IsEnabled(FeatureId.CheckDiskSpace))
await BlockOnInsufficientDiskSpaceAsync(specResults, applicationParametersParser, ct);
if (!await IsTrustedRealmAsync(decentralandUrlsSource, ct))
@@ -400,7 +400,7 @@ async UniTask LoadStartingRealmAsync(CancellationToken ct)
try { await bootstrap.LoadStartingRealmAsync(dynamicWorldContainer!, ct); }
catch (RealmChangeException)
{
- if (await ShowLoadErrorPopupAsync(ct) == ErrorPopupWithRetryController.Result.RESTART)
+ if (await ShowLoadErrorPopupAsync(ct) == ErrorPopupWithRetryController.Result.Restart)
await LoadStartingRealmAsync(ct);
else
ExitUtils.Exit();
@@ -412,14 +412,14 @@ async UniTask LoadUserFlowAsync(Entity playerEntity, CancellationToken ct)
try { await bootstrap.UserInitializationAsync(dynamicWorldContainer!, bootstrapContainer, globalWorld, playerEntity, ct); }
catch (TimeoutException)
{
- if (await ShowLoadErrorPopupAsync(ct) == ErrorPopupWithRetryController.Result.RESTART)
+ if (await ShowLoadErrorPopupAsync(ct) == ErrorPopupWithRetryController.Result.Restart)
await LoadUserFlowAsync(playerEntity, ct);
else
throw;
}
catch (RealmChangeException)
{
- if (await ShowLoadErrorPopupAsync(ct) == ErrorPopupWithRetryController.Result.RESTART)
+ if (await ShowLoadErrorPopupAsync(ct) == ErrorPopupWithRetryController.Result.Restart)
await LoadUserFlowAsync(playerEntity, ct);
else
ExitUtils.Exit();
@@ -644,8 +644,8 @@ private void RestoreInputs()
{
// We enable Inputs through the inputBlock so the block counters can be properly updated and the component Active flags are up-to-date as well
// We restore all inputs except EmoteWheel and FreeCamera as they should be disabled by default
- staticContainer!.InputBlock.EnableAll(InputMapComponent.Kind.FREE_CAMERA,
- InputMapComponent.Kind.EMOTE_WHEEL);
+ staticContainer!.InputBlock.EnableAll(InputMapComponent.Kind.FreeCamera,
+ InputMapComponent.Kind.EmoteWheel);
DCLInput.Instance.UI.Enable();
}
@@ -778,7 +778,7 @@ private async UniTask ShowUntrustedRealmConfirmationAsync(CancellationToke
var input = new ErrorPopupWithRetryController.Input(
title: "Load Error",
description: "A loading error was encountered. Please reload to try again.",
- iconType: ErrorPopupWithRetryController.IconType.ERROR);
+ iconType: ErrorPopupWithRetryController.IconType.Error);
await mvcManager.ShowAsync(ErrorPopupWithRetryController.IssueCommand(input), ct);
@@ -872,7 +872,7 @@ public void Dispose()
var input = new ErrorPopupWithRetryController.Input(
title: "Time sync needed",
description: "Your clock may be out of sync. Turn on “Set time automatically” in Date & Time settings and try again.",
- iconType: ErrorPopupWithRetryController.IconType.CLOCK);
+ iconType: ErrorPopupWithRetryController.IconType.Clock);
var ordering = new CanvasOrdering(controller.Layer, splashScreen.Value.GetComponent