Skip to content

Commit

Permalink
[FEATURE] #106 : GetEventListFromDate에 당일 이전의 일정만 가져오도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Jan 19, 2024
1 parent 7a56ebc commit 7ded4cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.wap.wapp.core.network.source.event

import com.google.firebase.firestore.FirebaseFirestore
import com.google.firebase.firestore.ktx.toObject
import com.wap.wapp.core.model.util.DateUtil.generateNowDateTime
import com.wap.wapp.core.network.constant.EVENT_COLLECTION
import com.wap.wapp.core.network.model.event.EventRequest
import com.wap.wapp.core.network.model.event.EventResponse
Expand Down Expand Up @@ -37,9 +38,10 @@ class EventDataSourceImpl @Inject constructor(

// 선택된 날짜 1일 00시 00분 00초
val startDateTime = date.atStartOfDay().toISOLocalDateTimeString()

val currentDateTime = generateNowDateTime().toISOLocalDateTimeString()
val task = firebaseFirestore.collection(EVENT_COLLECTION)
.whereGreaterThanOrEqualTo("startDateTime", startDateTime)
.whereLessThanOrEqualTo("startDateTime", currentDateTime)
.get()
.await()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal fun WappAttendacneRow(
}

@Composable
private fun WappAttendanceBadge(isAttendance: Boolean = true) {
private fun WappAttendanceBadge(isAttendance: Boolean) {
val drawableId = if (isAttendance) R.drawable.ic_attendance else R.drawable.ic_absent
Image(painter = painterResource(id = drawableId), contentDescription = "")
}

0 comments on commit 7ded4cb

Please sign in to comment.