Added logic for search fragment