Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dagger-hilt 적용 #5

Merged
merged 39 commits into from
Feb 17, 2025
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
370532b
api통신을 위한 의존성 추가 및 buildConfig, viewBinding사용설정
Leesin0222 Dec 24, 2024
a92ef14
viewBinding적용으로 인한 view id수정
Leesin0222 Dec 24, 2024
faadea2
api통신을 사용하며 기존 인 메모리에서 사용되던 RecentReadCardListManager및 Card data class제거
Leesin0222 Dec 24, 2024
d82e06b
api통신 실패 시 보여줄 에러 메시지 정의
Leesin0222 Dec 24, 2024
17664cf
Manifest에 인터넷 권한 명시 및 cleartextTraffic사용하도록 설정
Leesin0222 Dec 24, 2024
aa342b1
CardResponse 구현
Leesin0222 Dec 24, 2024
26fabe3
cardApi 및 RetrofitBuilder구현
Leesin0222 Dec 24, 2024
702797e
토스트 확장 함수 구현
Leesin0222 Dec 24, 2024
24b2e1e
LifeCycle 코루틴 처리 확장함수 구현
Leesin0222 Dec 24, 2024
d907d09
MainActivity에 viewBinding적용
Leesin0222 Dec 24, 2024
0f56f12
AllCardListAdapter에 viewBinding적용 및 updateAllCard함수 구현
Leesin0222 Dec 24, 2024
bc88ce5
CardViewHolder에 viewBinding적용
Leesin0222 Dec 24, 2024
bb14c63
RecentReadCardListAdapter에 viewBinding적용 및 첫 번째 아이템 제거 함수 구현
Leesin0222 Dec 24, 2024
c0bc3a5
AllCardListFragment에 뷰바인딩 적용 및 모든 카드를 api 호출하여 받아오도록 구현
Leesin0222 Dec 24, 2024
180b637
RecentReadCardListFragment에 viewBinding적용 및 api호출 로직 구현
Leesin0222 Dec 24, 2024
86f6c2a
CardDetailActivity에 viewBinding적용 및 api호출 로직 구현
Leesin0222 Dec 24, 2024
d930bbe
Glide의존성 추가 및 imageUrl불러와 image띄워주는 로직 구현
Leesin0222 Dec 24, 2024
110c96d
getExtra type수정
Leesin0222 Dec 24, 2024
c4396a2
changeCardReadStatus api 함수에 Card return값 추가
Leesin0222 Jan 3, 2025
f3a8498
RepositoryBuilder와 CardRepository구현
Leesin0222 Jan 3, 2025
cd3f572
최근 읽은 카드 목록 화면의 ViewModel 및 ViewModelFactory추가
Leesin0222 Jan 3, 2025
f681277
카드 상세 화면의 ViewModel 및 ViewModelFactory추가
Leesin0222 Jan 3, 2025
fa72ae3
모든 카드 목록 화면의 ViewModel 및 ViewModelFactory추가
Leesin0222 Jan 3, 2025
1034815
api 요청 시 모든 카드 목록 ViewModel을 사용하도록 수정
Leesin0222 Jan 3, 2025
dc6b9c6
api 요청 시 최근 읽은 카드 목록 ViewModel을 사용하도록 수정
Leesin0222 Jan 3, 2025
df1115c
api 요청 시 카드상세 ViewModel을 사용하도록 수정
Leesin0222 Jan 3, 2025
5c1dea5
remote package 생성 및 remote해당 파일 package변경
Leesin0222 Jan 7, 2025
102d7b3
ksp, room 종속성 추가
Leesin0222 Jan 7, 2025
19f3d5d
room local 로직 구현
Leesin0222 Jan 7, 2025
f968225
localdata와 remotedata간의 card mapper 구현
Leesin0222 Jan 7, 2025
a57ba2c
모든 카드 받아오기 함수에 캐싱 로직 구현
Leesin0222 Jan 7, 2025
0a287c9
dagger hilt 종속성 추가
Leesin0222 Jan 7, 2025
388bfec
hilt Application 선언 및 Manifest에 name space 추가
Leesin0222 Jan 7, 2025
cfd9968
api와 Network Module 구현
Leesin0222 Jan 7, 2025
f4c26cf
room모듈 구현
Leesin0222 Jan 7, 2025
909cdb9
repository모듈 구현
Leesin0222 Jan 7, 2025
1ac6330
repository에서 모든 카드 리스트 받아오는 함수 flow로 캐싱로직 emit하도록 수정
Leesin0222 Jan 7, 2025
7b2c84a
hilt 적용
Leesin0222 Jan 7, 2025
9cf2696
기존 Builder파일 제거
Leesin0222 Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
RecentReadCardListAdapter에 viewBinding적용 및 첫 번째 아이템 제거 함수 구현
Leesin0222 committed Dec 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit bb14c63457b01991c68f5318b353ebdc4fc00e80
Original file line number Diff line number Diff line change
@@ -4,15 +4,13 @@ import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import com.yongjincompany.android_assignment.data.Card
import com.yongjincompany.android_assignment.R
import com.yongjincompany.android_assignment.data.model.response.Card
import com.yongjincompany.android_assignment.databinding.ItemCardBinding

class RecentReadCardListAdapter : ListAdapter<Card, CardViewHolder>(diffUtil) {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CardViewHolder {
val view = LayoutInflater
.from(parent.context)
.inflate(R.layout.item_card, parent, false)
return CardViewHolder(view, {})
val binding = ItemCardBinding.inflate(LayoutInflater.from(parent.context), parent, false)
return CardViewHolder(binding, {})
}

override fun onBindViewHolder(holder: CardViewHolder, position: Int) {
@@ -36,4 +34,13 @@ class RecentReadCardListAdapter : ListAdapter<Card, CardViewHolder>(diffUtil) {
}
}
}

fun removeFirstItem() {
val currentList = currentList.toMutableList()

if (currentList.isNotEmpty()) {
currentList.removeAt(0)
submitList(currentList)
}
}
}