-
Notifications
You must be signed in to change notification settings - Fork 0
[TNT-000] QA 반영 #121
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
Merged
Merged
[TNT-000] QA 반영 #121
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
32680e6
[TNT-000] fix: 수업 완료 실패 시 서버 메시지를 우선적으로 출력하도록 수정
hoyahozz 17f5e7c
[TNT-000] fix: Snackbar 의 아이콘 컬러가 정상적으로 출력되지 않던 오류 수정
hoyahozz eb4e691
[TNT-000] feat: SnackbarType 정의
hoyahozz 3089065
[TNT-000] fix: PT 수업 완료 시 토스트 출력 처리
hoyahozz 5a3de19
[TNT-000] fix: 세션 등록 시 메모를 30자 넘게 입력하더라도 완료 버튼이 활성화되던 오류 수정
hoyahozz ba65179
[TNT-000] fix: 회원 추가 코드가 간헐적으로 클립보드에 복사되지 않던 오류 수정
hoyahozz 8e81a41
[TNT-000] fix: 토스트가 사라지기 전까지 '뒤로가기' 가 동작하지 않던 오류 수정
hoyahozz 2505f60
[TNT-000] fix: 앱 최초 진입 후 알람 권한을 허용한 경우 앱 푸시 알림 허용 처리
hoyahozz 07ae04f
[TNT-000] fix: 로딩 컴포넌트 디자인 개선
hoyahozz 371132d
[TNT-000] fix: 이미지 전송 시 압축이 진행되지 않던 오류 수정
hoyahozz c7644de
[TNT-000] chore: 버전 코드 업데이트
hoyahozz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
core/designsystem/src/main/res/drawable/ic_check_success.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="28dp" | ||
| android:height="28dp" | ||
| android:viewportWidth="28" | ||
| android:viewportHeight="28"> | ||
| <path | ||
| android:pathData="M2,14C2,7.373 7.373,2 14,2C20.627,2 26,7.373 26,14C26,20.627 20.627,26 14,26C7.373,26 2,20.627 2,14Z" | ||
| android:fillColor="#1ED45A"/> | ||
| <group> | ||
| <clip-path | ||
| android:pathData="M4,4h20v20h-20z"/> | ||
| <path | ||
| android:pathData="M11.958,16.93L19.157,9.731C19.281,9.607 19.426,9.544 19.592,9.541C19.758,9.538 19.906,9.602 20.035,9.731C20.165,9.86 20.229,10.009 20.229,10.177C20.229,10.344 20.165,10.493 20.035,10.622L12.486,18.185C12.335,18.335 12.159,18.41 11.958,18.41C11.757,18.41 11.582,18.335 11.431,18.185L7.952,14.705C7.828,14.581 7.767,14.434 7.769,14.264C7.77,14.094 7.836,13.944 7.965,13.814C8.094,13.685 8.243,13.62 8.41,13.62C8.578,13.62 8.727,13.685 8.856,13.814L11.958,16.93Z" | ||
| android:fillColor="#ffffff"/> | ||
| </group> | ||
| </vector> |
29 changes: 5 additions & 24 deletions
29
core/ui/src/main/java/co/kr/tnt/ui/coil/ResizeTransformation.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,18 @@ | ||
| package co.kr.tnt.ui.coil | ||
|
|
||
| import android.graphics.Bitmap | ||
| import android.graphics.BitmapFactory | ||
| import co.kr.tnt.ui.extensions.toResizedByteArray | ||
| import coil.size.Size | ||
| import coil.transform.Transformation | ||
| import java.io.ByteArrayOutputStream | ||
|
|
||
| class ResizeTransformation( | ||
| private val maxSizeInBytes: Int, | ||
| ) : Transformation { | ||
| override val cacheKey: String = "resize_to_max_size_$maxSizeInBytes" | ||
|
|
||
| override suspend fun transform(input: Bitmap, size: Size): Bitmap { | ||
| var bitmap = input | ||
| var quality = 100 | ||
|
|
||
| while (true) { | ||
| val byteArrayOutputStream = ByteArrayOutputStream() | ||
| bitmap.compress(Bitmap.CompressFormat.JPEG, quality, byteArrayOutputStream) | ||
| val compressedSize = byteArrayOutputStream.size() | ||
|
|
||
| if (compressedSize <= maxSizeInBytes) { | ||
| break | ||
| } | ||
|
|
||
| bitmap = Bitmap.createScaledBitmap( | ||
| bitmap, | ||
| (bitmap.width * 0.9).toInt(), | ||
| (bitmap.height * 0.9).toInt(), | ||
| true, | ||
| ) | ||
| quality -= 5 | ||
| override suspend fun transform(input: Bitmap, size: Size): Bitmap = | ||
| input.toResizedByteArray(maxSizeInBytes).let { resizedByteArray -> | ||
| BitmapFactory.decodeByteArray(resizedByteArray, 0, resizedByteArray.size) | ||
| } | ||
|
|
||
| return bitmap | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package co.kr.tnt.ui.extensions | ||
|
|
||
| import android.graphics.Bitmap | ||
| import java.io.ByteArrayOutputStream | ||
|
|
||
| fun Bitmap.toResizedByteArray(maxSizeInBytes: Int): ByteArray { | ||
| var resizedBitmap = this | ||
| var quality = 100 | ||
|
|
||
| val byteArrayOutputStream = ByteArrayOutputStream() | ||
| resizedBitmap.compress(Bitmap.CompressFormat.JPEG, quality, byteArrayOutputStream) | ||
| var compressedSize = byteArrayOutputStream.size() | ||
|
|
||
| while (compressedSize > maxSizeInBytes) { | ||
| resizedBitmap = Bitmap.createScaledBitmap( | ||
| resizedBitmap, | ||
| (resizedBitmap.width * 0.9).toInt(), | ||
| (resizedBitmap.height * 0.9).toInt(), | ||
| true, | ||
| ) | ||
|
|
||
| if (quality > 50) { | ||
| quality -= 5 | ||
| } | ||
|
|
||
| byteArrayOutputStream.reset() | ||
| resizedBitmap.compress(Bitmap.CompressFormat.JPEG, quality, byteArrayOutputStream) | ||
| compressedSize = byteArrayOutputStream.size() | ||
| } | ||
|
|
||
| return byteArrayOutputStream.toByteArray() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package co.kr.tnt.ui.model | ||
|
|
||
| import androidx.annotation.DrawableRes | ||
| import co.kr.tnt.core.designsystem.R | ||
|
|
||
| enum class SnackbarType( | ||
| @DrawableRes val iconRes: Int, | ||
| ) { | ||
| WARNING(R.drawable.ic_warning), | ||
| SUCCESS(R.drawable.ic_check_success), | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다.. 🥺