diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..76c30a0 Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ diff --git a/app/src/main/java/com/chaeda/chaeda/presentation/assignment/result/submit/ResultSubmitActivity.kt b/app/src/main/java/com/chaeda/chaeda/presentation/assignment/result/submit/ResultSubmitActivity.kt index 47ad958..4ba22e9 100644 --- a/app/src/main/java/com/chaeda/chaeda/presentation/assignment/result/submit/ResultSubmitActivity.kt +++ b/app/src/main/java/com/chaeda/chaeda/presentation/assignment/result/submit/ResultSubmitActivity.kt @@ -110,9 +110,14 @@ class ResultSubmitActivity val arr = ArrayList() resultViewModel.problemRange.value.forEach { (i, strings) -> + Timber.tag("chaeda-check").d("i: $i, strings: ${strings.toList()}") + Timber.tag("chaeda-check").d("assignmentResult: ${resultViewModel.assignmentResult.value[i]}") val list = mutableListOf() strings.forEach { - list.add(ResultAnswer(resultViewModel.assignmentResult.value[i]?.containsKey(it)!!, it)) + if (resultViewModel.assignmentResult.value.containsKey(i)) + list.add(ResultAnswer(resultViewModel.assignmentResult.value[i]?.containsKey(it)!!, it)) + else + list.add(ResultAnswer(false, it)) } arr.add(ReviewAnswer(i, list)) } diff --git a/app/src/main/java/com/chaeda/chaeda/presentation/review/add/AddProblemPhotoActivity.kt b/app/src/main/java/com/chaeda/chaeda/presentation/review/add/AddProblemPhotoActivity.kt index 569a056..d33d7d2 100644 --- a/app/src/main/java/com/chaeda/chaeda/presentation/review/add/AddProblemPhotoActivity.kt +++ b/app/src/main/java/com/chaeda/chaeda/presentation/review/add/AddProblemPhotoActivity.kt @@ -78,6 +78,7 @@ class AddProblemPhotoActivity if (tsubject != null) initForResultReview() chapters = subject!!.chapters chapter = chapters!![0] + viewModel.updateChapter(chapter!!) initListener() initAddBtn() @@ -97,9 +98,14 @@ class AddProblemPhotoActivity with(binding) { val now = LocalDateTime.now() - etDate.setText(now.format(DateTimeFormatter.ofPattern("yyyy.MM.dd"))) + etDate.setText(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) etTextbook.setText(name) etIndex.setText(index) + with(viewModel) { + updateDateString(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) + updateTextbookName(name!!) + updateProblemNum(index!!) + } } } diff --git a/app/src/main/java/com/chaeda/chaeda/presentation/review/pdf/PdfListAdapter.kt b/app/src/main/java/com/chaeda/chaeda/presentation/review/pdf/PdfListAdapter.kt index 396b92b..c63713d 100644 --- a/app/src/main/java/com/chaeda/chaeda/presentation/review/pdf/PdfListAdapter.kt +++ b/app/src/main/java/com/chaeda/chaeda/presentation/review/pdf/PdfListAdapter.kt @@ -44,7 +44,7 @@ class PdfListAdapter (private val itemClick: (ReviewPdf) -> (Unit)) fun onBind(item: ReviewPdf) { binding.tvTitle.text = item.title - binding.tvContent.text = item.createdDateTime + binding.tvContent.text = item.createdDateTime.split("T")[0] binding.ivThumbnail.setImageResource(R.drawable.ic_empty_thumbnail) binding.root.setOnSingleClickListener { diff --git a/app/src/main/java/com/chaeda/chaeda/presentation/review/pdf/ReviewPdfListActivity.kt b/app/src/main/java/com/chaeda/chaeda/presentation/review/pdf/ReviewPdfListActivity.kt index 35a4522..0cb328a 100644 --- a/app/src/main/java/com/chaeda/chaeda/presentation/review/pdf/ReviewPdfListActivity.kt +++ b/app/src/main/java/com/chaeda/chaeda/presentation/review/pdf/ReviewPdfListActivity.kt @@ -21,8 +21,10 @@ import com.chaeda.base.util.extension.setOnSingleClickListener import com.chaeda.chaeda.R import com.chaeda.chaeda.databinding.ActivityReviewPdfListBinding import com.chaeda.chaeda.presentation.review.add.ReviewState +import com.chaeda.domain.entity.ReviewPdf import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.launch +import timber.log.Timber import java.io.File import java.net.URL @@ -91,7 +93,8 @@ class ReviewPdfListActivity private fun initView() { pdfAdapter = PdfListAdapter { - viewModel.getReviewPdf(it.id) +// viewModel.getReviewPdf(it.id) + urlDownloading(TEST_DOWNLOAD_PDF) } binding.rvPdf.adapter = pdfAdapter @@ -105,9 +108,11 @@ class ReviewPdfListActivity when (state) { is ReviewState.GetReviewPdfListSuccess -> { pdfAdapter.setItems(state.list) + pdfAdapter.setItems(listOf(ReviewPdf(1L, "review", "2024-06-12"))) } is ReviewState.GetReviewPdfSuccess -> { - urlDownloading(state.url) +// urlDownloading(state.url) + urlDownloading(TEST_DOWNLOAD_PDF) } else -> { } } @@ -136,6 +141,7 @@ class ReviewPdfListActivity val columnReason: Int = cursor.getColumnIndex(DownloadManager.COLUMN_REASON) val status: Int = cursor.getInt(columnIndex) cursor.close() + Timber.tag("chaeda-download").d("columnReason : $columnReason") when (status) { DownloadManager.STATUS_SUCCESSFUL -> Toast.makeText( this@ReviewPdfListActivity, @@ -160,16 +166,19 @@ class ReviewPdfListActivity } private fun urlDownloading(url: String) { + Timber.tag("chaeda-download").d("urlDownloading: $url") if (mDownloadManager == null) { mDownloadManager = getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager } - val outputFile = File(outputFilePath + getFileName(url)) +// val outputFile = File(outputFilePath + getFileName(url)) + val outputFile = File(outputFilePath + "review.pdf") if (!outputFile.getParentFile().exists()) { outputFile.getParentFile().mkdirs() } val uri = Uri.parse(url) val request = DownloadManager.Request(uri) - request.setTitle(getFileName(url)) +// request.setTitle(getFileName(url)) + request.setTitle("review.pdf") request.setDestinationUri(Uri.fromFile(outputFile)) request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) request.setAllowedOverMetered(true) @@ -194,6 +203,8 @@ class ReviewPdfListActivity companion object { fun getIntent(context: Context) = Intent(context, ReviewPdfListActivity::class.java) - private const val TEST_DOWNLOAD_PDF = "https://s3-fullaccel.s3.ap-northeast-2.amazonaws.com/s3test.pdf?response-content-disposition=inline&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEFkaDmFwLW5vcnRoZWFzdC0yIkcwRQIgQeJMXDrTVUmXe8zZe8FYa9%2BczXT4Cl0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amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240527T094435Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Credential=ASIA3FLD3C3RXLOIJY7W%2F20240527%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Signature=35adc1687804d93e07dbf18aa6c4df4601d3f0ec15ca675283cdc2f5d35b490a" +// private const val TEST_DOWNLOAD_PDF = "https://drive.google.com/file/d/1wHbsqcfI9E9NRMuLgh4DYYcDHaba3xqN/view?usp=drive_link" +// private const val TEST_DOWNLOAD_PDF = "https://bigfile.mail.naver.com/download?fid=PqR0W6k9WzU9KAujK3ejFAMlKxEjKogZFAgrKxUmKAg/KxvjKxbZKAblFoKla3e4KoMZKrMqKzumK4UmMouXp6MdF6pSK6JCF6UrpzMdM2==" + private const val TEST_DOWNLOAD_PDF = "https://bigfile.mail.naver.com/download?fid=P9R0W6k9WzU9aAujK3ejaxu9FAbjKogZFAgrKxUmKxUwKAujKxbZKAblFoKla3YrKogqKxU/KA3Sp6tmFrKrFrElK4ulax3CFo2lFxK9pt==" } } \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_homework_add.png b/app/src/main/res/drawable/ic_homework_add.png index e3f6237..c25320f 100644 Binary files a/app/src/main/res/drawable/ic_homework_add.png and b/app/src/main/res/drawable/ic_homework_add.png differ diff --git a/app/src/main/res/layout/activity_add_problem_photo.xml b/app/src/main/res/layout/activity_add_problem_photo.xml index 72a9e3c..cf05de9 100644 --- a/app/src/main/res/layout/activity_add_problem_photo.xml +++ b/app/src/main/res/layout/activity_add_problem_photo.xml @@ -98,7 +98,7 @@ android:background="@drawable/shape_rect8_fill_brown" android:textAlignment="center" android:gravity="center" - android:text="문제 사진 불러오기" + android:text="문제 사진 촬영하기" app:layout_constraintTop_toBottomOf="@id/et_date" android:layout_marginTop="33dp" android:fontFamily="@font/nanumsquare_bold" diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml deleted file mode 100644 index 6f3b755..0000000 --- a/app/src/main/res/mipmap-anydpi/ic_launcher.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml deleted file mode 100644 index 6f3b755..0000000 --- a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp index c209e78..8d78992 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..cc8ded6 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp index b2dfe3d..8bcfaac 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp index 4f0f1d6..22d0731 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..169f334 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp index 62b611d..a1dce72 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp index 948a307..bcb9444 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..6280436 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp index 1b9a695..334c92d 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp index 28d4b77..6bddba2 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..dff72ae Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp index 9287f50..25c47f6 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp index aa7d642..2aceba1 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..157002d Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp index 9126ae3..0c60648 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..c5d5899 --- /dev/null +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d360e1a..6242da3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - Chaeda + 채다 채다 서비스에서 제공하는\n통계 정보들은 아래와 같습니다. 풀이한 문항 수 비교 특정 날짜, 주차, 월을 기준으로\n사용자가 풀이한 문제 수를 그래프로 비교합니다. diff --git a/core/data/src/main/java/com/chaeda/data/datasoure/remote/RemoteStatisticsDataSource.kt b/core/data/src/main/java/com/chaeda/data/datasoure/remote/RemoteStatisticsDataSource.kt index 874a2a6..3bead49 100644 --- a/core/data/src/main/java/com/chaeda/data/datasoure/remote/RemoteStatisticsDataSource.kt +++ b/core/data/src/main/java/com/chaeda/data/datasoure/remote/RemoteStatisticsDataSource.kt @@ -67,6 +67,10 @@ class RemoteStatisticsDataSource @Inject constructor( suspend fun getWrongCountByChapter( chapter: String ): List { - return statisticsService.getWrongCountByChapter(chapter) + val list = mutableListOf() + statisticsService.getWrongCountByChapter(chapter).forEach { + list.add(it.toConceptDetail()) + } + return list } } \ No newline at end of file diff --git a/core/data/src/main/java/com/chaeda/data/service/StatisticsService.kt b/core/data/src/main/java/com/chaeda/data/service/StatisticsService.kt index b47bcbf..812c913 100644 --- a/core/data/src/main/java/com/chaeda/data/service/StatisticsService.kt +++ b/core/data/src/main/java/com/chaeda/data/service/StatisticsService.kt @@ -58,5 +58,5 @@ interface StatisticsService { @GET("/statistics/statistics/accumulated/{chapter}/list") suspend fun getWrongCountByChapter( @Path("chapter") chapter: String - ): List + ): List } \ No newline at end of file