Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ interface NoticeApiService {
suspend fun requestAllNoticeList(@Query("end") end: Int): NetworkResponse<NoticeListResponse>

@GET("/api/v1/notice/{noticeId}")
suspend fun requestDetailNotice(@Path("noticeId") noticeId: Int): NetworkResponse<NoticeDetailResponse>
suspend fun requestDetailNotice(@Path("noticeId") noticeId: Long): NetworkResponse<NoticeDetailResponse>
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data class NoticeDetailResponse(

data class NoticeDto(
@SerializedName("id")
val id: Int,
val id: Long,
@SerializedName("title")
val title: String,
@SerializedName("createdDate")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class NoticeRepositoryImpl @Inject constructor(
NoticePagingSource(noticeApiService, NOTICE_PAGE_SIZE)
}.flow

override suspend fun requestDetailNotice(noticeId: Int): NetworkResponse<NoticeDetail> =
override suspend fun requestDetailNotice(noticeId: Long): NetworkResponse<NoticeDetail> =
when (
val response = noticeApiService.requestDetailNotice(noticeId)) {
is NetworkResponse.Success -> NetworkResponse.Success(response.body?.toNoticeDetail())
Expand Down
2 changes: 1 addition & 1 deletion domain/src/main/java/daily/dayo/domain/model/Notice.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package daily.dayo.domain.model
import java.io.Serializable

data class Notice(
val noticeId: Int,
val noticeId: Long,
val title: String,
val uploadDate: String
) : Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import kotlinx.coroutines.flow.Flow

interface NoticeRepository {
suspend fun requestAllNoticeList(): Flow<PagingData<Notice>>
suspend fun requestDetailNotice(noticeId: Int): NetworkResponse<NoticeDetail>
suspend fun requestDetailNotice(noticeId: Long): NetworkResponse<NoticeDetail>
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import javax.inject.Inject
class RequestDetailNoticeUseCase @Inject constructor(
private val noticeRepository: NoticeRepository
) {
suspend operator fun invoke(noticeId: Int) =
suspend operator fun invoke(noticeId: Long) =
noticeRepository.requestDetailNotice(noticeId)
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ class SettingFragment : Fragment() {

private fun setNoticeButtonClickListener() {
binding.layoutSettingNotice.setOnDebounceClickListener {
findNavController().navigateSafe(
currentDestinationId = R.id.SettingFragment,
action = R.id.action_settingFragment_to_noticeFragment
)
}
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import daily.dayo.presentation.screen.mypage.navigateFolderPostMove
import daily.dayo.presentation.screen.mypage.navigateFollowMenu
import daily.dayo.presentation.screen.mypage.navigateMyPage
import daily.dayo.presentation.screen.mypage.navigateProfileEdit
import daily.dayo.presentation.screen.notice.navigateNotices
import daily.dayo.presentation.screen.notice.navigateNoticeDetail
import daily.dayo.presentation.screen.post.navigatePost
import daily.dayo.presentation.screen.post.navigatePostLikeUsers
import daily.dayo.presentation.screen.profile.navigateProfile
Expand Down Expand Up @@ -69,6 +71,14 @@ class MainNavigator(
navController.navigateSearchPostHashtag(hashtag = hashtag)
}

fun navigateNotices() {
navController.navigateNotices()
}

fun navigateNoticeDetail(noticeId: Long) {
navController.navigateNoticeDetail(noticeId = noticeId)
}

fun navigateSettings() {
navController.navigateSettings()
}
Expand Down
Loading