Skip to content

Commit

Permalink
Merge pull request #1125 from bounswe/mobile/forum-redesign
Browse files Browse the repository at this point in the history
Mobile/forum redesign
  • Loading branch information
bilalatim authored Dec 25, 2023
2 parents 3b6b502 + 7f047cd commit f3858a6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/mobile/Assets/Scripts/CommentRequests/CommentBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ public void Init(CommentReply commentInfo, CommentComments editReplyManagerInfo)
editButton.gameObject.SetActive(false);
}

// Admin can delete any comment
if ( PersistenceManager.Role == "ADMIN")
{
deleteButton.gameObject.SetActive(true);
}

Debug.Log("Comment id is "+ commentId);

}
Expand Down
4 changes: 2 additions & 2 deletions app/mobile/Assets/Scripts/GameRequests/GameScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ public class GameScreen : MonoBehaviour
private List<GamePage> gamePages = new List<GamePage>();
// private List<(string,string)> queryParams = new List<(string, string)>();


private void Awake()
{
filterButton.onClick.AddListener(OnClickedFilter);
}

private void Start()
{
ListGames(null);
StartCoroutine(GetAllTags(AppVariables.HttpServerUrl + "/tag/get-all"));
OnClickedFilter();
}


Expand All @@ -58,6 +57,7 @@ private void OnClickedFilter()
private GetGameListRequest ChangeFilterParameter()
{
GetGameListRequest gameRequestData = new GetGameListRequest();
gameRequestData.findDeleted = false;
var playerTypesList = playerTypes.GetSelectedItems();
var genreList = genre.GetSelectedItems();
var platformsList = platforms.GetSelectedItems();
Expand Down
4 changes: 4 additions & 0 deletions app/mobile/Assets/Scripts/PostRequests/ForumCreatePost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ private void DisplayCharacters(CharacterResponse[] characters)

foreach (var character in characters)
{
if (character.isDeleted)
{
continue;
}
Character charObj = Instantiate(Resources.Load<Character>("Prefabs/Character"), charObjParent);
charObjects.Add(charObj);
// will be inited differently
Expand Down
6 changes: 6 additions & 0 deletions app/mobile/Assets/Scripts/PostRequests/ForumPost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ public void Init(GetPostListResponse postInfo, ForumPostComments commentManagerI
deletePost.gameObject.SetActive(false);
editPost.gameObject.SetActive(false);
}

// Admin can delete any post
if ( PersistenceManager.Role == "ADMIN")
{
deletePost.gameObject.SetActive(true);
}
}

private void AddTags(TagResponse[] tags)
Expand Down

0 comments on commit f3858a6

Please sign in to comment.