-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into feat/#758
# Conflicts: # android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/festivallist/FestivalListFragment.kt # android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/schooldetail/SchoolDetailFragment.kt # android/festago/presentation/src/main/res/layout/fragment_school_detail.xml
- Loading branch information
Showing
148 changed files
with
5,003 additions
and
760 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
37 changes: 17 additions & 20 deletions
37
...ation/ui/home/festivallist/popularfestival/foreground/PopularFestivalForegroundAdapter.kt
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 |
---|---|---|
@@ -1,36 +1,33 @@ | ||
package com.festago.festago.presentation.ui.home.festivallist.popularfestival.foreground | ||
|
||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.DiffUtil | ||
import androidx.recyclerview.widget.ListAdapter | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.festago.festago.presentation.ui.home.festivallist.uistate.FestivalItemUiState | ||
|
||
class PopularFestivalForegroundAdapter : | ||
ListAdapter<FestivalItemUiState, PopularFestivalForegroundViewHolder>(diffUtil) { | ||
class PopularFestivalForegroundAdapter(festivals: List<FestivalItemUiState> = listOf()) : | ||
RecyclerView.Adapter<PopularFestivalForegroundViewHolder>() { | ||
|
||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PopularFestivalForegroundViewHolder { | ||
private val _festivals = festivals.toMutableList() | ||
|
||
override fun onCreateViewHolder( | ||
parent: ViewGroup, | ||
viewType: Int, | ||
): PopularFestivalForegroundViewHolder { | ||
return PopularFestivalForegroundViewHolder.of(parent) | ||
} | ||
|
||
override fun onBindViewHolder(holder: PopularFestivalForegroundViewHolder, position: Int) { | ||
holder.bind(getItem(position)) | ||
holder.bind(_festivals[position % _festivals.size]) | ||
} | ||
|
||
companion object { | ||
val diffUtil = object : DiffUtil.ItemCallback<FestivalItemUiState>() { | ||
override fun areItemsTheSame( | ||
oldItem: FestivalItemUiState, | ||
newItem: FestivalItemUiState, | ||
): Boolean { | ||
return oldItem.id == newItem.id | ||
} | ||
override fun getItemCount(): Int = Int.MAX_VALUE | ||
|
||
override fun areContentsTheSame( | ||
oldItem: FestivalItemUiState, | ||
newItem: FestivalItemUiState, | ||
): Boolean { | ||
return oldItem == newItem | ||
} | ||
fun submitList(festivals: List<FestivalItemUiState>) { | ||
if (_festivals.toList() == festivals) { | ||
return | ||
} | ||
_festivals.clear() | ||
_festivals.addAll(festivals) | ||
notifyDataSetChanged() | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
backend/src/main/java/com/festago/admin/application/AdminFestivalV1QueryService.java
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,21 @@ | ||
package com.festago.admin.application; | ||
|
||
import com.festago.admin.dto.AdminFestivalV1Response; | ||
import com.festago.admin.repository.AdminFestivalV1QueryDslRepository; | ||
import com.festago.common.querydsl.SearchCondition; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Service | ||
@Transactional(readOnly = true) | ||
@RequiredArgsConstructor | ||
public class AdminFestivalV1QueryService { | ||
|
||
private final AdminFestivalV1QueryDslRepository adminFestivalV1QueryDslRepository; | ||
|
||
public Page<AdminFestivalV1Response> findAll(SearchCondition searchCondition) { | ||
return adminFestivalV1QueryDslRepository.findAll(searchCondition); | ||
} | ||
} |
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
Oops, something went wrong.