From 81dda875659d8b977784c3da476c6bd3c29ea48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AA=85=EC=84=9D?= Date: Tue, 7 Feb 2023 12:24:35 +0900 Subject: [PATCH] =?UTF-8?q?Issues=20#287=20fix:=20=EC=8B=A4=ED=96=89?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=ED=98=95=ED=83=9C=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 1 + app/src/main/java/com/lighthouse/di/ProviderModule.kt | 2 +- commons/common-android/build.gradle.kts | 2 +- commons/common-location/build.gradle.kts | 2 +- commons/common-recognizer/build.gradle.kts | 2 +- .../datasource/gallery/GalleryImageLocalSourceImpl.kt | 2 +- .../datasource/gallery/GalleryImagePagingSource.kt | 2 +- .../datasource/gifticon/GifticonLocalDataSource.kt | 8 ++++---- .../datasource/gifticon/GifticonLocalDataSourceImpl.kt | 8 ++++---- .../mapper/BrandPlaceInfoDataContainerMapper.kt | 2 +- .../ui/detailgifticon/dialog/LargeBarcodeDialog.kt | 5 ++--- .../ui/detailgifticon/dialog/UseGifticonDialog.kt | 4 +--- .../presentation/ui/setting/UsedGifticonViewModel.kt | 2 +- .../src/main/res/layout/fragment_setting_main.xml | 2 +- 14 files changed, 21 insertions(+), 23 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 612db0091..6e9a040f0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -36,6 +36,7 @@ dependencies { implementation(projects.model) implementation(projects.common) implementation(projects.commonAndroid) + implementation(projects.commonLocation) implementation(projects.domain) implementation(projects.presentation) implementation(projects.data) diff --git a/app/src/main/java/com/lighthouse/di/ProviderModule.kt b/app/src/main/java/com/lighthouse/di/ProviderModule.kt index fe2b63d78..dabf4b7a4 100644 --- a/app/src/main/java/com/lighthouse/di/ProviderModule.kt +++ b/app/src/main/java/com/lighthouse/di/ProviderModule.kt @@ -1,7 +1,7 @@ package com.lighthouse.di import android.content.Context -import com.lighthouse.datasource.location.SharedLocationManager +import com.lighthouse.common.utils.location.SharedLocationManager import com.lighthouse.presentation.background.NotificationHelper import dagger.Module import dagger.Provides diff --git a/commons/common-android/build.gradle.kts b/commons/common-android/build.gradle.kts index c904ac66d..7faacbea1 100644 --- a/commons/common-android/build.gradle.kts +++ b/commons/common-android/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } android { - namespace = "com.lighthouse.beep.common" + namespace = "com.lighthouse.beep.common.android" } dependencies { diff --git a/commons/common-location/build.gradle.kts b/commons/common-location/build.gradle.kts index 6a11e36c8..9cddb5aff 100644 --- a/commons/common-location/build.gradle.kts +++ b/commons/common-location/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } android { - namespace = "com.lighthouse.beep.common" + namespace = "com.lighthouse.beep.common.location" } dependencies { diff --git a/commons/common-recognizer/build.gradle.kts b/commons/common-recognizer/build.gradle.kts index 7d3d77ade..98ffa1429 100644 --- a/commons/common-recognizer/build.gradle.kts +++ b/commons/common-recognizer/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } android { - namespace = "com.lighthouse.beep.common" + namespace = "com.lighthouse.beep.common.recognizer" } dependencies { diff --git a/data/src/main/java/com/lighthouse/datasource/gallery/GalleryImageLocalSourceImpl.kt b/data/src/main/java/com/lighthouse/datasource/gallery/GalleryImageLocalSourceImpl.kt index 7d84de18d..ee1b109da 100644 --- a/data/src/main/java/com/lighthouse/datasource/gallery/GalleryImageLocalSourceImpl.kt +++ b/data/src/main/java/com/lighthouse/datasource/gallery/GalleryImageLocalSourceImpl.kt @@ -6,7 +6,7 @@ import android.os.Build import android.os.Bundle import android.provider.MediaStore import android.webkit.MimeTypeMap -import com.lighthouse.domain.model.GalleryImage +import com.lighthouse.beep.model.gallery.GalleryImage import java.util.Date import javax.inject.Inject diff --git a/data/src/main/java/com/lighthouse/datasource/gallery/GalleryImagePagingSource.kt b/data/src/main/java/com/lighthouse/datasource/gallery/GalleryImagePagingSource.kt index 9839e5110..ab78a6af6 100644 --- a/data/src/main/java/com/lighthouse/datasource/gallery/GalleryImagePagingSource.kt +++ b/data/src/main/java/com/lighthouse/datasource/gallery/GalleryImagePagingSource.kt @@ -2,7 +2,7 @@ package com.lighthouse.datasource.gallery import androidx.paging.PagingSource import androidx.paging.PagingState -import com.lighthouse.domain.model.GalleryImage +import com.lighthouse.beep.model.gallery.GalleryImage class GalleryImagePagingSource( private val localSource: GalleryImageLocalSource, diff --git a/data/src/main/java/com/lighthouse/datasource/gifticon/GifticonLocalDataSource.kt b/data/src/main/java/com/lighthouse/datasource/gifticon/GifticonLocalDataSource.kt index 83e3ca03c..9205af486 100644 --- a/data/src/main/java/com/lighthouse/datasource/gifticon/GifticonLocalDataSource.kt +++ b/data/src/main/java/com/lighthouse/datasource/gifticon/GifticonLocalDataSource.kt @@ -1,11 +1,11 @@ package com.lighthouse.datasource.gifticon +import com.lighthouse.beep.model.brand.Brand +import com.lighthouse.beep.model.etc.SortBy +import com.lighthouse.beep.model.gifticon.Gifticon +import com.lighthouse.beep.model.user.UsageHistory import com.lighthouse.database.entity.GifticonEntity import com.lighthouse.database.entity.GifticonWithCrop -import com.lighthouse.domain.model.Brand -import com.lighthouse.domain.model.Gifticon -import com.lighthouse.domain.model.SortBy -import com.lighthouse.domain.model.UsageHistory import kotlinx.coroutines.flow.Flow interface GifticonLocalDataSource { diff --git a/data/src/main/java/com/lighthouse/datasource/gifticon/GifticonLocalDataSourceImpl.kt b/data/src/main/java/com/lighthouse/datasource/gifticon/GifticonLocalDataSourceImpl.kt index 4249f2dc5..56744d07f 100644 --- a/data/src/main/java/com/lighthouse/datasource/gifticon/GifticonLocalDataSourceImpl.kt +++ b/data/src/main/java/com/lighthouse/datasource/gifticon/GifticonLocalDataSourceImpl.kt @@ -1,5 +1,9 @@ package com.lighthouse.datasource.gifticon +import com.lighthouse.beep.model.brand.Brand +import com.lighthouse.beep.model.etc.SortBy +import com.lighthouse.beep.model.gifticon.Gifticon +import com.lighthouse.beep.model.user.UsageHistory import com.lighthouse.core.exts.isExpired import com.lighthouse.core.exts.today import com.lighthouse.database.dao.GifticonDao @@ -7,10 +11,6 @@ import com.lighthouse.database.entity.GifticonEntity import com.lighthouse.database.entity.GifticonWithCrop import com.lighthouse.database.mapper.toUsageHistory import com.lighthouse.database.mapper.toUsageHistoryEntity -import com.lighthouse.domain.model.Brand -import com.lighthouse.domain.model.Gifticon -import com.lighthouse.domain.model.SortBy -import com.lighthouse.domain.model.UsageHistory import com.lighthouse.mapper.toDomain import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map diff --git a/data/src/main/java/com/lighthouse/mapper/BrandPlaceInfoDataContainerMapper.kt b/data/src/main/java/com/lighthouse/mapper/BrandPlaceInfoDataContainerMapper.kt index f4d5b2ac8..ce3be3521 100644 --- a/data/src/main/java/com/lighthouse/mapper/BrandPlaceInfoDataContainerMapper.kt +++ b/data/src/main/java/com/lighthouse/mapper/BrandPlaceInfoDataContainerMapper.kt @@ -1,6 +1,6 @@ package com.lighthouse.mapper -import com.lighthouse.domain.model.BrandPlaceInfo +import com.lighthouse.beep.model.brand.BrandPlaceInfo import com.lighthouse.model.BrandPlaceInfoDataContainer internal fun List.toDomain(brandName: String): List { diff --git a/presentation/src/main/java/com/lighthouse/presentation/ui/detailgifticon/dialog/LargeBarcodeDialog.kt b/presentation/src/main/java/com/lighthouse/presentation/ui/detailgifticon/dialog/LargeBarcodeDialog.kt index 1ab5e01f5..3750043c2 100644 --- a/presentation/src/main/java/com/lighthouse/presentation/ui/detailgifticon/dialog/LargeBarcodeDialog.kt +++ b/presentation/src/main/java/com/lighthouse/presentation/ui/detailgifticon/dialog/LargeBarcodeDialog.kt @@ -15,7 +15,6 @@ import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -import javax.inject.Inject @AndroidEntryPoint class LargeBarcodeDialog : DialogFragment(R.layout.dialog_large_barcode) { @@ -26,8 +25,8 @@ class LargeBarcodeDialog : DialogFragment(R.layout.dialog_large_barcode) { "" } - @Inject - lateinit var barcodeUtil: BarcodeUtil + // Hilt를 이용하여 주입 + private val barcodeUtil = BarcodeUtil() override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) diff --git a/presentation/src/main/java/com/lighthouse/presentation/ui/detailgifticon/dialog/UseGifticonDialog.kt b/presentation/src/main/java/com/lighthouse/presentation/ui/detailgifticon/dialog/UseGifticonDialog.kt index 9f8c70dd1..292023bc6 100644 --- a/presentation/src/main/java/com/lighthouse/presentation/ui/detailgifticon/dialog/UseGifticonDialog.kt +++ b/presentation/src/main/java/com/lighthouse/presentation/ui/detailgifticon/dialog/UseGifticonDialog.kt @@ -20,7 +20,6 @@ import com.lighthouse.presentation.ui.detailgifticon.GifticonDetailViewModel import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext -import javax.inject.Inject @AndroidEntryPoint class UseGifticonDialog : BottomSheetDialogFragment(R.layout.dialog_use_gifticon) { @@ -28,8 +27,7 @@ class UseGifticonDialog : BottomSheetDialogFragment(R.layout.dialog_use_gifticon private val viewModel: GifticonDetailViewModel by activityViewModels() private var amountToUse = mutableStateOf(0) - @Inject - lateinit var barcodeUtil: BarcodeUtil + private val barcodeUtil = BarcodeUtil() override fun getTheme(): Int { return R.style.Theme_BEEP_BottomSheetDialog diff --git a/presentation/src/main/java/com/lighthouse/presentation/ui/setting/UsedGifticonViewModel.kt b/presentation/src/main/java/com/lighthouse/presentation/ui/setting/UsedGifticonViewModel.kt index eaa1b0c09..2a63881a8 100644 --- a/presentation/src/main/java/com/lighthouse/presentation/ui/setting/UsedGifticonViewModel.kt +++ b/presentation/src/main/java/com/lighthouse/presentation/ui/setting/UsedGifticonViewModel.kt @@ -2,7 +2,7 @@ package com.lighthouse.presentation.ui.setting import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.lighthouse.domain.model.DbResult +import com.lighthouse.beep.model.result.DbResult import com.lighthouse.domain.usecase.GetGifticonsUseCase import com.lighthouse.presentation.mapper.toPresentation import dagger.hilt.android.lifecycle.HiltViewModel diff --git a/presentation/src/main/res/layout/fragment_setting_main.xml b/presentation/src/main/res/layout/fragment_setting_main.xml index ad0dc0b79..946ad7f12 100644 --- a/presentation/src/main/res/layout/fragment_setting_main.xml +++ b/presentation/src/main/res/layout/fragment_setting_main.xml @@ -5,7 +5,7 @@ - +