Skip to content

Commit 5f45993

Browse files
committed
Merge branch 'develop' into 7-feature-change-route-ui
# Conflicts: # domain/src/main/java/com/stop/domain/di/UseCaseModule.kt # presentation/src/main/res/values/strings.xml
2 parents 8778254 + 739f7e0 commit 5f45993

File tree

75 files changed

+1380
-815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1380
-815
lines changed

โ€ŽREADME.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,43 @@
11
# android10-PlzStop
2-
๋ฒ„์Šค ๐ŸšŒ, ์ง€ํ•˜์ฒ  ๐Ÿš‹ ๋ฉˆ์ถฐ! โ›”
2+
3+
![cover2](https://user-images.githubusercontent.com/48354989/205480662-4a958899-33a4-406b-87c1-2c16723a43e5.png)
4+
5+
# ํ”„๋กœ์ ํŠธ ์†Œ๊ฐœ
6+
7+
![plzstop_icon](https://user-images.githubusercontent.com/48354989/205480621-38dd340e-fbbb-4644-a673-386b241076bc.png) ๋ฒ„์Šคย ๐ŸšŒ, ์ง€ํ•˜์ฒ ย ๐Ÿš‹ย ๋ฉˆ์ถฐ!ย โ›” - ๋Œ€์ค‘๊ตํ†ต ๋ง‰์ฐจ ์•Œ๋žŒ ์„œ๋น„์Šค **Plz Stop**
8+
9+
10+
> ํ˜น์‹œ **๋ง‰์ฐจ ์‹œ๊ฐ„** ํ™•์ธ์„ ์œ„ํ•ด<br/>
11+
๊ณ„์† ํ•ธ๋“œํฐ๋งŒ ๋ถ™์žก๊ณ  ๊ณ„์‹œ์ง„ ์•Š์œผ์‹ ๊ฐ€์š”? <br/>
12+
**Plz Stop**์ด ๋Œ€์‹  ํ™•์ธํ•ด๋“œ๋ฆด๊ฒŒ์š”!
13+
14+
### ๐ŸšŒ ์›ํ•˜๋Š” ๊ฒฝ๋กœ์˜ **๋Œ€์ค‘๊ตํ†ต ๋ง‰์ฐจ ์ •๋ณด**๋ฅผ ํ™•์ธํ•ด ๋ณด์„ธ์š”
15+
16+
์ถœ๋ฐœ์ง€์™€ ๋„์ฐฉ์ง€๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ํ•ด๋‹น ๊ฒฝ๋กœ์˜ ๋Œ€์ค‘๊ตํ†ต ๋ง‰์ฐจ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค
17+
18+
### โฐ ๋ง‰์ฐจ ์•Œ๋žŒ์„ ๋“ฑ๋กํ•ด ๋ณด์„ธ์š”
19+
20+
ํ•ด๋‹น ๊ฒฝ๋กœ์˜ ๋ง‰์ฐจ ์•Œ๋žŒ์„ ๋“ฑ๋กํ•˜๋ฉด ๋ง‰์ฐจ ์‹œ๊ฐ„ 00๋ถ„ ์ „์— ์•Œ๋žŒ์„ ํ†ตํ•ด ์•Œ๋ ค๋“œ๋ฆฝ๋‹ˆ๋‹ค
21+
22+
### ๐Ÿƒ๐Ÿป ์ •๋ฅ˜์žฅ๊นŒ์ง€ ๋Œ€์ค‘๊ตํ†ต๋ณด๋‹ค ๋จผ์ € ๋„์ฐฉํ• ์ง€ ์‹œํ•ฉํ•ด๋ณด์„ธ์š”
23+
24+
์‚ฌ์šฉ์ž์˜ ํ˜„์žฌ ์œ„์น˜์™€ ๋Œ€์ค‘๊ตํ†ต์˜ ํ˜„์žฌ ์œ„์น˜๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ง€๋„์— ๋ณด์—ฌ์ค๋‹ˆ๋‹ค
25+
26+
27+
28+
29+
# ์ฃผ์š” ๊ธฐ๋Šฅ
30+
31+
|**ํ™”๋ฉด ์ด๋ฏธ์ง€**|**๊ธฐ๋Šฅ**|**์„ค๋ช…**|
32+
|:---:|:---:|:--|
33+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205481015-7fdbfa1b-9dbe-4c3a-ba46-4e155e4f4178.png">|์ง€๋„|- ์‚ฌ์šฉ์ž์˜ ํ˜„์žฌ ์œ„์น˜๋ฅผ **์‹ค์‹œ๊ฐ„์œผ๋กœ ํŠธ๋ž˜ํ‚น**ํ•˜์—ฌ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.<br/>- ์ง€๋„์ƒ์˜ ์ž„์˜์˜ ์ง€์ ์„ ํด๋ฆญํ•˜๋ฉด **ํ˜„ ์œ„์น˜๋กœ๋ถ€ํ„ฐ์˜ ๊ฑฐ๋ฆฌ๋ฅผ ํฌํ•จํ•œ ์ƒ์„ธ ์ •๋ณด**๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.<br/>- ๋ง‰์ฐจ ์•Œ๋žŒ์ด ์„ค์ •๋˜์–ด ์žˆ์œผ๋ฉด ํ™”๋ฉด ํ•˜๋‹จ์— **์•Œ๋žŒ ์ •๋ณด**๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.|
34+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205481015-7fdbfa1b-9dbe-4c3a-ba46-4e155e4f4178.png">|๊ฒ€์ƒ‰|- ์›ํ•˜๋Š” ์žฅ์†Œ๋ฅผ ๊ฒ€์ƒ‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.<br/>- ๋ชฉ์ ์ง€์— ๊ฐˆ ์ˆ˜ ์žˆ๋Š” ๋Œ€์ค‘๊ตํ†ต ๊ฒฝ๋กœ๋ฅผ ์•Œ๋ ค์ค๋‹ˆ๋‹ค.<br/>|
35+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205481015-7fdbfa1b-9dbe-4c3a-ba46-4e155e4f4178.png">|๋ง‰์ฐจ|- ๊ฒฝ๋กœ์ƒ์— ์žˆ๋Š” ์Šน์ฐจ์ง€์˜ **๋ง‰์ฐจ ์‹œ๊ฐ„**์„ ์•Œ๋ ค์ค๋‹ˆ๋‹ค.<br/>- ์Šน์ฐจ์ง€ ์‚ฌ์ด์˜ ์ด๋™ ๊ฑฐ๋ฆฌ์™€ ๋ง‰์ฐจ ์‹œ๊ฐ„์„ ๊ณ ๋ คํ•˜์—ฌ, **์ฒซ ์Šน์ฐจ์ง€์— ํƒ‘์Šนํ•˜๋Ÿฌ ์ถœ๋ฐœํ•ด์•ผ ํ•˜๋Š” ์ฐ-๋ง‰์ฐจ ์‹œ๊ฐ„**์„ ์•Œ๋ ค์ค๋‹ˆ๋‹ค.<br/>|
36+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205481015-7fdbfa1b-9dbe-4c3a-ba46-4e155e4f4178.png">|์•Œ๋žŒ|- ์‚ฌ์šฉ์ž๊ฐ€ ์›ํ•˜๋Š” ๊ฒฝ๋กœ์˜ ๋ง‰์ฐจ ์‹œ๊ฐ„ 00๋ถ„ ์ „์— ์•Œ๋žŒ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.<br/>- ์•Œ๋žŒ์„ ์†Œ๋ฆฌ ๋˜๋Š” ์ง„๋™์œผ๋กœ ์„ ํƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.<br/>- ์‹ค์‹œ๊ฐ„์œผ๋กœ ๋ณ€๋™๋˜๋Š” ๋ง‰์ฐจ ์‹œ๊ฐ„์„ ๊ณ„์‚ฐํ•ด์„œ ์•Œ๋žŒ์„ ์•Œ๋ ค์ค๋‹ˆ๋‹ค.<br/>|
37+
|<img width=200 src="https://user-images.githubusercontent.com/48354989/205480897-3bb391fa-174e-4622-b16c-1a4817c74f78.png">|๋ฏธ์…˜|- ์‚ฌ์šฉ์ž์˜ ํ˜„์žฌ ์œ„์น˜, ๋ชฉ์ ์ง€, ๋Œ€์ค‘๊ตํ†ต์˜ ํ˜„์žฌ **์‹ค์‹œ๊ฐ„ ์œ„์น˜**๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.<br/>- ์‚ฌ์šฉ์ž์™€ ๋Œ€์ค‘๊ตํ†ต์ด **๋ชฉ์ ์ง€๊นŒ์ง€์˜ ๊ฒฝ๋กœ**๋ฅผ ํ‘œ์‹œํ•ด์ค๋‹ˆ๋‹ค.<br/>- ํ•ด๋‹น ๋ชฉ์ ์ง€๊นŒ์ง€ ๋Œ€์ค‘๊ตํ†ต๊ณผ ์‚ฌ์šฉ์ž ์ค‘ ๋ˆ„๊ฐ€ ๋จผ์ € ๋„์ฐฉํ• ์ง€ **์‹œํ•ฉ**ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.<br/>|
38+
39+
## ํŒ€ ์†Œ๊ฐœ ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘
40+
| K008 ๊น€์‹œ์ง„ | K037 ์ด์ข…์„ฑ | K039 ์ด์ง€๋ฏผ| K048 ์กฐ๊ฒฝํ˜„|
41+
|:-----------:|:----------:|:----------:|:----------:|
42+
|<img src="https://user-images.githubusercontent.com/74500793/200560529-5c77f1a6-bcdc-4517-a13f-1f274683f530.png" width="150" height="150">|<img src="https://user-images.githubusercontent.com/74500793/200560658-e61ebec8-5e5d-42cf-9a65-a9f34bbebde7.png" width="150" height="150">|<img src="https://user-images.githubusercontent.com/74500793/200560030-6b96b399-e1c0-40d9-8901-2a959d437ab5.png" width="150" height="150">|<img src="https://user-images.githubusercontent.com/74500793/200560802-28af2528-a1e9-48cb-9e5e-889793bb53bb.png" width="150" height="150">|
43+
|[@koreatlwls](https://github.com/koreatlwls)| [@DoTheBestMayB](https://github.com/DoTheBestMayB) |[@jeeminimini](https://github.com/jeeminimini)|[@khcho226](https://github.com/khcho226)|

โ€Ždata/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ dependencies {
6767
// Moshi
6868
implementation 'com.squareup.moshi:moshi-kotlin:1.14.0'
6969
implementation 'com.squareup.moshi:moshi:1.14.0'
70+
implementation 'com.squareup.moshi:moshi-adapters:1.14.0'
7071
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.14.0'
7172

7273
// xml parser

โ€Ždata/src/main/java/com/stop/data/di/LocalDataSourceModule.kt renamed to โ€Ždata/src/main/java/com/stop/data/di/AlarmDataSourceModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import javax.inject.Singleton
1313

1414
@Module
1515
@InstallIn(SingletonComponent::class)
16-
object LocalDataSourceModule {
16+
object AlarmDataSourceModule {
1717

1818
@Provides
1919
@Singleton

โ€Ždata/src/main/java/com/stop/data/di/DataSourceModule.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.stop.data.di
22

3+
import com.stop.data.local.source.alarm.RecentPlaceSearchLocalDataSource
4+
import com.stop.data.local.source.alarm.RecentPlaceSearchLocalDataSourceImpl
35
import com.stop.data.remote.source.nearplace.NearPlaceRemoteDataSource
46
import com.stop.data.remote.source.nearplace.NearPlaceRemoteDataSourceImpl
57
import com.stop.data.remote.source.nowlocation.NowLocationRemoteDataSource
@@ -34,4 +36,10 @@ internal interface DataSourceModule {
3436
nowLocationRemoteDataSourceImpl: NowLocationRemoteDataSourceImpl
3537
): NowLocationRemoteDataSource
3638

39+
@Binds
40+
@Singleton
41+
fun provideRecentPlaceSearchLocalDataSource(
42+
recentPlaceSearchLocalDataSourceImpl: RecentPlaceSearchLocalDataSourceImpl
43+
) : RecentPlaceSearchLocalDataSource
44+
3745
}
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
package com.stop.data.di
22

3+
import android.content.Context
4+
import androidx.room.Room
5+
import com.stop.data.local.database.TroubleShooterApplicationDatabase
6+
import com.stop.data.local.database.TroubleShooterApplicationDatabase.Companion.DB_NAME
7+
import com.stop.data.local.database.dao.RecentPlaceSearchDao
38
import dagger.Module
9+
import dagger.Provides
410
import dagger.hilt.InstallIn
11+
import dagger.hilt.android.qualifiers.ApplicationContext
512
import dagger.hilt.components.SingletonComponent
13+
import javax.inject.Singleton
614

715
@InstallIn(SingletonComponent::class)
816
@Module
9-
class DatabaseModule {
17+
object DatabaseModule {
1018

11-
/* @Provides
19+
@Provides
1220
@Singleton
1321
fun provideApplicationDatabase(@ApplicationContext context: Context): TroubleShooterApplicationDatabase {
1422
return Room.databaseBuilder(
@@ -17,6 +25,14 @@ class DatabaseModule {
1725
DB_NAME
1826
).fallbackToDestructiveMigration()
1927
.build()
20-
}*/
28+
}
29+
30+
@Provides
31+
@Singleton
32+
fun provideRecentPlaceSearchDao(
33+
troubleShooterApplicationDatabase: TroubleShooterApplicationDatabase
34+
): RecentPlaceSearchDao {
35+
return troubleShooterApplicationDatabase.getRecentPlaceSearchDao()
36+
}
2137

2238
}

โ€Ždata/src/main/java/com/stop/data/di/NetworkModule.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
package com.stop.data.di
22

33
import com.squareup.moshi.Moshi
4+
import com.squareup.moshi.adapters.PolymorphicJsonAdapterFactory
45
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
56
import com.stop.data.BuildConfig
67
import com.stop.data.remote.ResultCallAdapter
8+
import com.stop.domain.model.route.tmap.custom.Route
9+
import com.stop.domain.model.route.tmap.custom.TransportRoute
10+
import com.stop.domain.model.route.tmap.custom.WalkRoute
711
import com.tickaroo.tikxml.TikXml
812
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory
913
import dagger.Module
@@ -46,6 +50,11 @@ internal object NetworkModule {
4650
@Singleton
4751
fun provideMoshi(): Moshi {
4852
return Moshi.Builder()
53+
.add(PolymorphicJsonAdapterFactory
54+
.of(Route::class.java,"Route")
55+
.withSubtype(TransportRoute::class.java, "TransportRoute")
56+
.withSubtype(WalkRoute::class.java, "WalkRoute")
57+
)
4958
.addLast(KotlinJsonAdapterFactory())
5059
.build()
5160
}

โ€Ždata/src/main/java/com/stop/data/di/RepositoryModule.kt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
package com.stop.data.di
22

3-
import com.stop.data.repository.AlarmRepositoryImpl
4-
import com.stop.data.repository.NearPlaceRepositoryImpl
5-
import com.stop.data.repository.NowLocationRepositoryImpl
6-
import com.stop.data.repository.RouteRepositoryImpl
7-
import com.stop.domain.repository.AlarmRepository
8-
import com.stop.domain.repository.NearPlaceRepository
9-
import com.stop.domain.repository.NowLocationRepository
10-
import com.stop.domain.repository.RouteRepository
3+
import com.stop.data.repository.*
4+
import com.stop.domain.repository.*
115
import dagger.Binds
126
import dagger.Module
137
import dagger.hilt.InstallIn
@@ -33,10 +27,20 @@ internal interface RepositoryModule {
3327

3428
@Binds
3529
@Singleton
36-
fun provideAlarmRepository(alarmRepositoryImpl: AlarmRepositoryImpl): AlarmRepository
30+
fun provideAlarmRepository(
31+
alarmRepositoryImpl: AlarmRepositoryImpl
32+
): AlarmRepository
3733

3834
@Binds
3935
@Singleton
40-
fun provideNowLocationRepository(nowLocationRepositoryImpl: NowLocationRepositoryImpl): NowLocationRepository
36+
fun provideNowLocationRepository(
37+
nowLocationRepositoryImpl: NowLocationRepositoryImpl
38+
): NowLocationRepository
39+
40+
@Binds
41+
@Singleton
42+
fun provideRecentPlaceSearchRepository(
43+
recentPlaceSearchRepositoryImpl: RecentPlaceSearchRepositoryImpl
44+
): RecentPlaceSearchRepository
4145

4246
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.stop.data.local.database
2+
3+
import androidx.room.Database
4+
import androidx.room.RoomDatabase
5+
import com.stop.data.local.database.dao.RecentPlaceSearchDao
6+
import com.stop.data.local.model.RecentPlaceSearchEntity
7+
8+
@Database(
9+
entities = [RecentPlaceSearchEntity::class],
10+
version = 1
11+
)
12+
abstract class TroubleShooterApplicationDatabase : RoomDatabase() {
13+
14+
abstract fun getRecentPlaceSearchDao(): RecentPlaceSearchDao
15+
16+
companion object {
17+
const val DB_NAME = "TroubleShooter.db"
18+
}
19+
}

โ€Ždata/src/main/java/com/stop/data/local/database/dao/AlarmDao.kt

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.stop.data.local.database.dao
2+
3+
import androidx.room.Dao
4+
import androidx.room.Insert
5+
import androidx.room.OnConflictStrategy
6+
import androidx.room.Query
7+
import com.stop.data.local.model.RecentPlaceSearchEntity
8+
import kotlinx.coroutines.flow.Flow
9+
10+
@Dao
11+
interface RecentPlaceSearchDao {
12+
13+
@Insert(onConflict = OnConflictStrategy.REPLACE)
14+
suspend fun insertRecentPlaceSearchEntity(recentPlaceSearchEntity: RecentPlaceSearchEntity)
15+
16+
@Query("SELECT * FROM RecentPlaceSearchEntity ORDER BY id DESC")
17+
fun getAllRecentPlaceSearchEntity(): Flow<List<RecentPlaceSearchEntity>>
18+
19+
@Query("DELETE FROM RecentPlaceSearchEntity")
20+
suspend fun deleteAllRecentPlaceSearchEntity()
21+
}

0 commit comments

Comments
ย (0)