public FriendsSearchPromptController(UsersSearchPromptView promptView, IFriendsController friendsController) { view = promptView; view.SetIdleSearchTime(IDLE_TIME_TRIGGER_SEARCH); friendsHandler = new UsersSearchFriendsHandler(friendsController); userViewsHandler = new UsersSearchUserViewsHandler(view.GetUsersBaseElement(), view.GetUserElementsParent()); friendsHandler.OnFriendRemoved += OnFriendRemoved; searchHandler.OnSearchChanged += OnSearchResult; view.OnSearchText += OnSearchText; view.OnShouldHide += OnShouldHidePrompt; userViewsHandler.OnAddUser += OnAddUserPressed; userViewsHandler.OnRemoveUser += OnRemoveUserPressed; }
public UsersSearchPromptController(UsersSearchPromptView promptView) { view = promptView; view.SetIdleSearchTime(1.5f); userViewsHandler = new UsersSearchUserViewsHandler(view.GetUsersBaseElement(), view.GetUserElementsParent()); usersSearcher = new UsersSearcher(); view.OnSearchText += OnSearchText; view.OnShouldHide += OnShouldHidePrompt; userViewsHandler.OnAddUser += OnAddUserPressed; userViewsHandler.OnRemoveUser += OnRemoveUserPressed; }