-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6148 from decentraland/release/release-20240401
Release: 20240401
- Loading branch information
Showing
70 changed files
with
8,629 additions
and
1,430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
...r/Assets/Scripts/MainScripts/DCL/Controllers/HUD/MyAccountHUD/BlockedListComponentView.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
using DCL.Helpers; | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace DCL.MyAccount | ||
{ | ||
public class BlockedListComponentView : BaseComponentView, IBlockedListComponentView | ||
{ | ||
[Header("General")] | ||
[SerializeField] internal GameObject mainContainer; | ||
[SerializeField] internal GameObject loadingContainer; | ||
[SerializeField] internal RectTransform contentTransform; | ||
[SerializeField] internal GameObject scrollBar; | ||
[SerializeField] internal CollapsableSortedBlockedEntryList blockedList; | ||
|
||
public event Action<string> OnUnblockUser; | ||
|
||
public void SetupBlockedList() | ||
{ | ||
blockedList.OnUnblockUser = OnUnblockUser; | ||
int SortByAlphabeticalOrder(BlockedUserEntry u1, BlockedUserEntry u2) | ||
{ | ||
return string.Compare(u1.Model.userName, u2.Model.userName, StringComparison.InvariantCultureIgnoreCase); | ||
} | ||
|
||
blockedList.SortingMethod = SortByAlphabeticalOrder; | ||
} | ||
|
||
public void Set(BlockedUserEntryModel user) | ||
{ | ||
blockedList.Set(user.userId, user); | ||
RefreshContentLayout(); | ||
} | ||
|
||
public void Remove(string userId) | ||
{ | ||
blockedList.Remove(userId); | ||
RefreshContentLayout(); | ||
} | ||
|
||
public void ClearAllEntries() | ||
{ | ||
blockedList.Clear(); | ||
} | ||
|
||
public override void Show(bool instant = false) | ||
{ | ||
gameObject.SetActive(true); | ||
|
||
if (scrollBar != null) | ||
scrollBar.SetActive(true); | ||
} | ||
|
||
public override void Hide(bool instant = false) | ||
{ | ||
gameObject.SetActive(false); | ||
|
||
if (scrollBar != null) | ||
scrollBar.SetActive(false); | ||
} | ||
|
||
public void SetLoadingActive(bool isActive) | ||
{ | ||
loadingContainer.SetActive(isActive); | ||
mainContainer.SetActive(!isActive); | ||
} | ||
|
||
public void RefreshContentLayout() => | ||
Utils.ForceRebuildLayoutImmediate(contentTransform); | ||
|
||
public override void RefreshControl() | ||
{ | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ets/Scripts/MainScripts/DCL/Controllers/HUD/MyAccountHUD/BlockedListComponentView.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.