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

Feature/tgyuu/#116 #123

Merged
merged 8 commits into from
Feb 13, 2024
Merged

Feature/tgyuu/#116 #123

merged 8 commits into from
Feb 13, 2024

Conversation

tgyuuAn
Copy link
Member

@tgyuuAn tgyuuAn commented Feb 12, 2024

1. ๐Ÿ“„ ๊ด€๋ จ๋œ ์ด์Šˆ ๋ฐ ์†Œ๊ฐœ

closed #122
colsed #116

2. ๐Ÿ”ฅ ๋ณ€๊ฒฝ๋œ ์ 

  • ๊ฐค๋Ÿญ์‹œ S22์™€ ๊ฐ™์€ ํ•˜๋‹จ Navigation Bar๊ฐ€ ์žˆ๋Š” ํœด๋Œ€ํฐ์—์„œ ๋งˆ์ง„์„ ํ•ด๊ฒฐํ–ˆ์ง€๋งŒ,

Pixelํฐ๊ณผ ๊ฐ™์€ ๊ธฐ๋ณธ์ ์œผ๋กœ gestureNavigation Bar๋กœ ์ด๋ฃจ์–ด์ง„ ํฐ์—์„œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์€ ํฐ์ƒ‰ ์—ฌ๋ฐฑ์ด ์ƒ๊ฒผ๋‹ค..

์ด๋ฅผ ํ•ด๊ฒฐํ•ด์ฃผ์—ˆ๋‹ค.

(์ด์ œ ๋ชจ๋“  ํฐ ์—์„œ UI ์™„๋ฒฝ)




- ์ถœ์„ ์ผ์ •์„ ๊ฐ€์ ธ์˜ค๋Š” ๊ณผ์ •์—์„œ ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ๋ฒ„๊ทธ๊ฐ€ ์žˆ์—ˆ๋‹ค.

๊ธฐ์กด ์ฝ”๋“œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ๋ฐ์ดํ„ฐ๊ฐ€ ์—†์„ ๊ฒฝ์šฐ checkNotNull์—์„œ illegatStateException์„ ๋ฑ‰์œผ๋ฉฐ Result.Failure์„ ๋ฐ˜ํ™˜ํ•˜์—ฌ

๋’ค์— ์žˆ๋Š” ํ•จ์ˆ˜๋“ค์ด ๋ชจ๋‘ ์ค„์ค„์ด ์ œ๋Œ€๋กœ ๋™์ž‘ํ•˜์ง€ ์•Š์•˜๋‹ค.

val attendanceResponse = task.toObject<AttendanceResponse>()
        checkNotNull(attendanceResponse)



์ด๋ฅผ ๋ง‰๊ธฐ ์œ„ํ•ด,

val attendanceResponse = task.toObject<AttendanceResponse>()
        attendanceResponse ?: AttendanceResponse(eventId = eventId, "", defaultDeadLine)
    }
}

private val defaultDeadLine = "2000-01-01T00:00:00.000000"

๋กœ ์ฝ”๋“œ๋กœ ๋ฐ”๊พธ์–ด, null์ผ ๊ฒฝ์šฐ deadline์œผ๋กœ ์•„์˜ˆ ์žˆ์„ ์ˆ˜๊ฐ€ ์—†์„ ์ •๋„์˜ ๊ณผ๊ฑฐ ์ถœ์„ ์ด๋ฒคํŠธ๋กœ ๋งŒ๋“ค์–ด

UseCase filter์—์„œ ์ž๋™์œผ๋กœ ๊ฑธ๋Ÿฌ์ง€๊ฒŒ ๋งŒ๋“ค์—ˆ๋‹ค.

                deferredList.awaitAll()
                    .map { it.getOrThrow() }
                    .filter { it.isBeforeEndTime() }




viewModel์—์„œ zip์„ ์ด์šฉํ•ด์„œ event ์ •๋ณด๋ฅผ ์–ป์–ด์˜ฌ ๋•Œ,

์ด๋ฏธ deadline์ด ์ง€๋‚œ ์ถœ์„์— ๋Œ€ํ•ด์„œ๋Š” ์œ„ usecase์—์„œ filter๊ฐ€ ๋˜์ง€๋งŒ,

์•„๋ž˜ ์›๋ž˜ ์ฝ”๋“œ์—์„œ EventAttendanceStatus์—์„œ ๋“ค์–ด๊ฐ€๋Š” eventId์™€ title, content๋Š” Usecase์—์„œ ๋ฐ˜ํ™˜๋˜๋Š” eventList๊ฐ€ ์•„๋‹Œ

ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•  ๋•Œ ๋“ค์–ด์˜ค๋Š” ํŒŒ๋ผ๋ฏธํ„ฐ eventList (ํ•„ํ„ฐ๋ง์ด ๋˜์ง€ ์•Š์€ ๊ฒƒ) ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฝ‘์•„์˜ค๊ธฐ ๋•Œ๋ฌธ์—

๋ฐ์ดํ„ฐ๊ฐ€ ์–ด๊ธ‹๋‚˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์ƒ๊ฒผ๋‹ค.

(eventList๋Š” ํ•„ํ„ฐ๋ง๋˜์ง€ ์•Š์€ ๋ฐ์ดํ„ฐ, attendanceList๋Š” ํ•ด๋‹น eventList๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ถœ์„์ด ์ •๋ณด๋ฅผ ์–ป์–ด์˜ค๋Š” ๋ฐ, deadline์ด ์ง€๋‚ฌ๋Š” ์ง€ ์•ˆ ์ง€๋‚ฌ๋Š” ์ง€ ํ•„ํ„ฐ๋ง ๋˜๋Š” eventList)

private suspend fun getEventListAttendance(eventList: List<Event>, userId: String) =
        getEventListAttendanceUseCase(eventList.map { it.eventId })
            .onSuccess { attendanceList ->
                val eventAttendanceList = eventList.zip(attendanceList)
                    .map { (event, attendance) ->
                        EventAttendanceStatus(
                            eventId = event.eventId,
                            title = event.title,
                            content = event.content,
                            remainAttendanceDateTime = attendance.calculateDeadline(),
                        )
                    }




๊ทธ๋ž˜์„œ UseCase์—์„œ ํ•„ํ„ฐ๋ง ๋˜๋Š” attendanceList์™€ ํ•จ์ˆ˜์˜ ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ ๋“ค์–ด๊ฐ€๋Š” eventList์˜ ๋™๊ธฐ๋ฅผ ๋งž์ถฐ์ฃผ๊ธฐ ์œ„ํ•ด

 val filteredEventList = eventList.filter {
                    it.eventId in attendanceList.map { it.eventId }
                }

                val eventAttendanceList = filteredEventList.zip(attendanceList)
                    .map { (event, attendance) ->
                        EventAttendanceStatus(
                            eventId = event.eventId,
                            title = event.title,
                            content = event.content,
                            remainAttendanceDateTime = attendance.calculateDeadline(),
                        )
                    }

์œ„์™€ ๊ฐ™์ด eventList์— ๋Œ€ํ•ด์„œ๋„ filter๋ฅผ ๊ฑฐ์ณค๋‹ค.

3. โœ… ๊ผญ ํ™•์ธํ•ด์คฌ์œผ๋ฉด ํ•˜๋Š” ๋ถ€๋ถ„

4. ๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท(์„ ํƒ)

5. ๐Ÿ’ก์•Œ๊ฒŒ๋œ ํ˜น์€ ๊ถ๊ธˆํ•œ ์‚ฌํ•ญ๋“ค

System์—์„œ ์ œ๊ณตํ•˜๋Š” statusBar์™€ ํ•˜๋‹จ NavigationBar๋•Œ๋ฌธ์— ์งœ์ฆ๋‚˜์„œ WindowInset์— ๋Œ€ํ•ด ๊ณต๋ถ€ํ•ด๋ณด๋ ค๊ณ  ํ•˜๋˜ ๋„์ค‘,

Inset ๊ณต์‹ ๋ฌธ์„œ ์—์„œ ์ œ๊ณตํ•˜๋Š” ๋™์˜์ƒ์—์„œ

์•„๋ž˜์™€ ๊ฐ™์ด Modifier.windowInsetsPadding ์ด๋ผ๋Š” ์—„์ฒญ๋‚œ Modifier๋ฅผ ๋ฐœ๊ฒฌํ–ˆ๋‹ค.

image




์‹ฌ์ง€์–ด WindowInsets.StatusBar ํ˜น์€ WindowInsets.navigationBar์™€ ๊ฐ™์ด ์†์‰ฝ๊ฒŒ ๊ธฐ๋ณธ ์„ค์ • ๋ฐ”์˜ ์ •๋ณด๋ฅผ ์–ป์–ด ์˜ฌ ์ˆ˜๋„ ์žˆ์—ˆ๋‹ค.




์•„์ฃผ ๋„๊ทธ ํ—ˆ๋‹ˆ

@tgyuuAn tgyuuAn added ๐Ÿงนํ—ˆ๋“œ๋ ›์ผ๐Ÿงน ์ข…์†์„ฑ ์ถ”๊ฐ€, ๊ธฐ๋Šฅ๊ณผ ๋ฌด๊ด€ํ•œ ์ฝ”๋“œ ์ž‘์„ฑ ๐Ÿงฉํƒœ๊ทœ๐Ÿงฉ ENFP ์•ˆํƒœ๊ทœ 24์„ธ ๐Ÿ”จํ”ฝ์Šค๐Ÿ”จ ๋ฒ„๊ทธ ๋ฐ ์ž ์žฌ์  ๋ฌธ์ œ ํ•ด๊ฒฐ labels Feb 12, 2024
@tgyuuAn tgyuuAn requested a review from jeongjaino February 12, 2024 17:08
@tgyuuAn tgyuuAn self-assigned this Feb 12, 2024
@jeongjaino
Copy link
Member

jeongjaino commented Feb 13, 2024

๊ณ ์ƒํ•˜์…จ์–ด์š” ํƒœ๊ทœ์ƒ !

๋ช‡๊ฐ€์ง€ ์งˆ๋ฌธ๋งŒ ์Šฅ ๋‚จ๊ฒจ๋ณผ๊ฒŒ์š” ์ด์ƒ์—†์œผ์‹œ๋ฉด ๊ทธ๋Œ€๋กœ ๋จธ์ง€ ํ•ด์ฃผ์…”๋„ ๋ผ์šฉ

  1. ํ˜„์žฌ ์ปค์Šคํ…€ ๋‹ฌ๋ ฅ์—์„œ '<' ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด ์ด์ „ ๋…„๋„์˜ ํ–‰์‚ฌ๋„ ๋ณผ ์ˆ˜ ์žˆ๋‚˜์š” ?

  2. defaultDateTime์ด ํ˜„์žฌ 2000๋…„๋Œ€๋กœ ์„ค์ •๋˜์–ด ์žˆ๋Š”๋ฐ, LocalDateTime์˜ MAX, MIN ์ƒ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์‹œ๋Š”๊ฑด ์–ด๋•Œ์š” ?

  3. ๊ธฐ์กด์— ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐ” ์ธก์ •ํ•˜๋Š” ๋กœ์ง์ด ์žˆ์—ˆ์ง€ ์•Š๋‚˜์š”??? ๊ทธ๋Ÿผ windowInsect์„ ์‚ฌ์šฉํ•˜๋ฉด, ๊ฐ„ํŽธํ•˜๊ฒŒ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ๊ฑด๊ฐ€์š”?

Copy link
Member

@jeongjaino jeongjaino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ๐Ÿ˜Ž

@jeongjaino jeongjaino added the ๐ŸŒŸ๋จธ์ง€ ํ•ด์ฃผ์„ธ์š”๐ŸŒŸ ์ฝ”๋“œ ๋ฆฌ๋ทฐ๊ฐ€ ์™„๋ฃŒ๋œ ๋’ค PR์„ ์˜ฌ๋ฆฐ์‚ฌ๋žŒ์ด Merge๋ฅผ ํ•˜๋ฉด ๋˜๋Š” ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค. label Feb 13, 2024
@tgyuuAn
Copy link
Member Author

tgyuuAn commented Feb 13, 2024

๊ณ ์ƒํ•˜์…จ์–ด์š” ํƒœ๊ทœ์ƒ !

๋ช‡๊ฐ€์ง€ ์งˆ๋ฌธ๋งŒ ์Šฅ ๋‚จ๊ฒจ๋ณผ๊ฒŒ์š” ์ด์ƒ์—†์œผ์‹œ๋ฉด ๊ทธ๋Œ€๋กœ ๋จธ์ง€ ํ•ด์ฃผ์…”๋„ ๋ผ์šฉ

  1. ํ˜„์žฌ ์ปค์Šคํ…€ ๋‹ฌ๋ ฅ์—์„œ '<' ๋ฒ„ํŠผ ๋ˆ„๋ฅด๋ฉด ์ด์ „ ๋…„๋„์˜ ํ–‰์‚ฌ๋„ ๋ณผ ์ˆ˜ ์žˆ๋‚˜์š” ?

  2. defaultDateTime์ด ํ˜„์žฌ 2000๋…„๋Œ€๋กœ ์„ค์ •๋˜์–ด ์žˆ๋Š”๋ฐ, LocalDateTime์˜ MAX, MIN ์ƒ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์‹œ๋Š”๊ฑด ์–ด๋•Œ์š” ?

  3. ๊ธฐ์กด์— ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐ” ์ธก์ •ํ•˜๋Š” ๋กœ์ง์ด ์žˆ์—ˆ์ง€ ์•Š๋‚˜์š”??? ๊ทธ๋Ÿผ windowInsect์„ ์‚ฌ์šฉํ•˜๋ฉด, ๊ฐ„ํŽธํ•˜๊ฒŒ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ๊ฑด๊ฐ€์š”?

  1. ๋ฌผ๋ก ์ž…๋‹ˆ๋‹ค...!

  2. ํ—‰ ๊ทธ๋Ÿฐ ๊ฟ€ํŒ์ด ๋ฐ˜์˜ํ•˜๊ณ  ๋จธ์ง€ํ—ˆ๊ฒ ์Šต๋‹ˆ๋‹ค...!

  3. ๊ธฐ์กด์—๋Š” ์‚ฌ๋ผ์ง„ ์ฝ”๋“œ์— ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐ” ๋†’์ด๋ฅผ ์ธก์ •ํ•˜๋Š” ํ•จ์ˆ˜๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค..!

(์•ˆ๋“œ๋กœ์ด๋“œ ํฐ ๊ธฐ๋ณธ์— ๋งจ ๋ฐ‘์— ๊น”๋ ค์žˆ๋Š”๊ฒŒ ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐ”๋ผ๊ณ  ํ•˜๋“œ๋ผ๊ตฌ์š”)

@tgyuuAn tgyuuAn merged commit 28a2281 into develop Feb 13, 2024
@tgyuuAn tgyuuAn deleted the feature/tgyuu/#116 branch February 13, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐ŸŒŸ๋จธ์ง€ ํ•ด์ฃผ์„ธ์š”๐ŸŒŸ ์ฝ”๋“œ ๋ฆฌ๋ทฐ๊ฐ€ ์™„๋ฃŒ๋œ ๋’ค PR์„ ์˜ฌ๋ฆฐ์‚ฌ๋žŒ์ด Merge๋ฅผ ํ•˜๋ฉด ๋˜๋Š” ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค. ๐Ÿ”จํ”ฝ์Šค๐Ÿ”จ ๋ฒ„๊ทธ ๋ฐ ์ž ์žฌ์  ๋ฌธ์ œ ํ•ด๊ฒฐ ๐Ÿงฉํƒœ๊ทœ๐Ÿงฉ ENFP ์•ˆํƒœ๊ทœ 24์„ธ ๐Ÿงนํ—ˆ๋“œ๋ ›์ผ๐Ÿงน ์ข…์†์„ฑ ์ถ”๊ฐ€, ๊ธฐ๋Šฅ๊ณผ ๋ฌด๊ด€ํ•œ ์ฝ”๋“œ ์ž‘์„ฑ
Projects
None yet
2 participants