Skip to content

Commit

Permalink
[chore] #25 AndroidEntryPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jihyunniiii committed Jun 6, 2024
1 parent e234a5e commit 067cc19
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
package com.dongguk.telepigeon.domain.usecase

import com.dongguk.telepigeon.domain.repository.QuestionAnswerRepository
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class GetMonthlyReportUseCase(
private val questionAnswerRepository: QuestionAnswerRepository,
) {
suspend operator fun invoke(
roomId: Int,
date: String,
) = questionAnswerRepository.getMonthlyReport(roomId = roomId, date = date)
}
class GetMonthlyReportUseCase
@Inject
constructor(
private val questionAnswerRepository: QuestionAnswerRepository,
) {
suspend operator fun invoke(
roomId: Int,
date: String,
) = questionAnswerRepository.getMonthlyReport(roomId = roomId, date = date)
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
package com.dongguk.telepigeon.domain.usecase

import com.dongguk.telepigeon.domain.repository.QuestionAnswerRepository
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class GetQuestionAnswerUseCase(
private val questionAnswerRepository: QuestionAnswerRepository,
) {
suspend operator fun invoke(
roomId: Int,
date: String?,
respondent: Boolean,
) = questionAnswerRepository.getQuestionAnswer(roomId = roomId, date = date, respondent = respondent)
}
class GetQuestionAnswerUseCase
@Inject
constructor(
private val questionAnswerRepository: QuestionAnswerRepository,
) {
suspend operator fun invoke(
roomId: Int,
date: String?,
respondent: Boolean,
) = questionAnswerRepository.getQuestionAnswer(roomId = roomId, date = date, respondent = respondent)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import com.dongguk.telepigeon.feature.databinding.FragmentCalendarBinding
import com.dongguk.telpigeon.core.ui.base.BindingFragment
import com.dongguk.telpigeon.core.ui.util.fragment.stringOf
import com.dongguk.telpigeon.core.ui.util.view.UiState
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import java.time.LocalDate

@AndroidEntryPoint
class CalendarFragment : BindingFragment<FragmentCalendarBinding>({ FragmentCalendarBinding.inflate(it) }) {
private val calendarViewModel by viewModels<CalendarViewModel>()
private lateinit var calendarAnswerAdapter: CalendarAnswerAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import com.dongguk.telepigeon.feature.calendar.calendar.CalendarFragment.Compani
import com.dongguk.telepigeon.feature.databinding.FragmentMonthlyReportBinding
import com.dongguk.telpigeon.core.ui.base.BindingFragment
import com.dongguk.telpigeon.core.ui.util.view.UiState
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach

@AndroidEntryPoint
class MonthlyReportFragment : BindingFragment<FragmentMonthlyReportBinding>({ FragmentMonthlyReportBinding.inflate(it) }) {
private val monthlyReportViewModel by viewModels<MonthlyReportViewModel>()

Expand Down

0 comments on commit 067cc19

Please sign in to comment.