-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Presentation 모듈 생성, Firebase 설정, 의존성 정리 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * feat: coil 의존성 추가, toml 정리, 파이어베이스 local key 설정 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * chore: Presentation module 삭제 및 app 모듈로 통합 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * feat: BaseFragment 생성 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * feat: 기본 Fragment 생성 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * feat: Navigation Component 설정 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * build: API 키 설정 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * feat: RecyclerView Decoration 생성 Co-authored-by: DoTheBestMayB <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * add: font resource Co-authored-by: DoTheBestMayB <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * feat: kakaoMap 의존성 추가, toml 정리, buildConfig 설정 Co-authored-by: DoTheBestMayB <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * feat: data 모듈 생성 및 retrofit 의존성 옮기기 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * style: Font, Dimen, Themes 설정 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * feat: data 모듈에 Repository 인터페이스 생성 및 필요한 데이터 클래스 정의 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * fix: textSize dp로 되어 있는 것을 dp로 바꾸기 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * chore: 코드 정렬 및 import 정리 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> * docs: 깃허브 템플릿 작성 Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]> --------- Co-authored-by: rlaxodud214 <[email protected]> Co-authored-by: yoonchanchoi <[email protected]> Co-authored-by: kory0115 <[email protected]>
- Loading branch information
1 parent
f12eda6
commit c613284
Showing
100 changed files
with
1,603 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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,15 @@ | ||
## 🚅 Issue 한 줄 요약 | ||
|
||
이슈를 한줄로 요약해주세요. | ||
|
||
## 🤷 Issue 세부 내용 | ||
|
||
무슨 이슈인가요? | ||
|
||
## ✨ 기대 결과 | ||
|
||
어떤 결과물을 원하시나요? | ||
|
||
## 📸 스크린샷 | ||
|
||
이슈에 해당하는 부분을 보여주세요. |
This file contains 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,20 @@ | ||
## (필수) 기능 구현 목록 | ||
|
||
- 구현 목록 | ||
|
||
## (필수) 스크린샷 | ||
|
||
- 사진 or GIF | ||
|
||
## (선택) Issue | ||
|
||
- 한 줄 요약 | ||
- 세부 내용 | ||
|
||
## (선택) 집중적으로 코드리뷰 받고 싶은 부분 | ||
|
||
- ex. Fragment와 RecyclerView의 생명주기에 맞게 제대로 구현했는지 검토 부탁드립니다. | ||
|
||
## 참고사항 | ||
|
||
- 팀원이나 코드 리뷰어에게 공유해야 할 내용 |
This file contains 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
6 changes: 2 additions & 4 deletions
6
app/src/androidTest/java/com/bestapp/rice/ExampleInstrumentedTest.kt
This file contains 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 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 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,14 @@ | ||
package com.bestapp.rice | ||
|
||
import android.app.Application | ||
import com.google.firebase.FirebaseApp | ||
import com.google.firebase.perf.metrics.AddTrace | ||
|
||
class App : Application() { | ||
|
||
@AddTrace(name = "onCreate") | ||
override fun onCreate() { | ||
super.onCreate() | ||
FirebaseApp.initializeApp(applicationContext) | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
app/src/main/java/com/bestapp/rice/FireBaseMessageReceiver.kt
This file contains 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,57 @@ | ||
package com.bestapp.rice | ||
|
||
import android.app.NotificationChannel | ||
import android.app.NotificationManager | ||
import android.app.PendingIntent | ||
import android.content.Context | ||
import android.content.Intent | ||
import android.media.RingtoneManager | ||
import androidx.core.app.NotificationCompat | ||
import com.bestapp.rice.ui.MainActivity | ||
import com.google.firebase.messaging.FirebaseMessagingService | ||
import com.google.firebase.messaging.RemoteMessage | ||
|
||
class FireBaseMessageReceiver : FirebaseMessagingService() { | ||
override fun onMessageReceived(remoteMessage: RemoteMessage) { //메세지 수신 | ||
super.onMessageReceived(remoteMessage) | ||
remoteMessage.notification?.let { | ||
it.title?.let { it1 -> it.body?.let { it2 -> sendNotification(it1, it2) } } | ||
} | ||
} | ||
|
||
override fun onNewToken(token: String) { //토큰 발급 | ||
super.onNewToken(token) | ||
} | ||
|
||
private fun sendNotification(title: String, messageBody: String) { //알림 기본로직 | ||
val intent = Intent(this, MainActivity::class.java) | ||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) | ||
val pendingIntent = PendingIntent.getActivity( | ||
this, 0 /* Request code */, intent, | ||
PendingIntent.FLAG_ONE_SHOT or PendingIntent.FLAG_IMMUTABLE | ||
) | ||
|
||
val channelId = "my_channel" | ||
val defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION) | ||
val notificationBuilder = NotificationCompat.Builder(this, channelId) | ||
.setSmallIcon(R.drawable.ic_launcher_background) | ||
.setContentTitle(title) | ||
.setContentText(messageBody) | ||
.setAutoCancel(true) | ||
.setSound(defaultSoundUri) | ||
.setContentIntent(pendingIntent) | ||
|
||
val notificationManager = | ||
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager | ||
|
||
// 버전 분기 처리 | ||
val channel = NotificationChannel( | ||
channelId, | ||
"Channel human readable title", | ||
NotificationManager.IMPORTANCE_DEFAULT | ||
) | ||
notificationManager.createNotificationChannel(channel) | ||
|
||
notificationManager.notify(0 /* ID of notification */, notificationBuilder.build()) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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,38 @@ | ||
package com.bestapp.rice.model | ||
|
||
import android.os.Parcelable | ||
import com.bestapp.rice.data.model.remote.Filter | ||
import kotlinx.parcelize.Parcelize | ||
|
||
interface FilterUiState { | ||
|
||
@Parcelize | ||
data class FoodUiState( | ||
val icon: String, | ||
val name: String, | ||
) : Parcelable, FilterUiState { | ||
|
||
companion object { | ||
|
||
fun createFrom(foodCategory: Filter.Food) = FoodUiState( | ||
icon = foodCategory.icon, | ||
name = foodCategory.name, | ||
) | ||
} | ||
} | ||
|
||
@Parcelize | ||
data class CostUiState( | ||
val name: Int, | ||
val type: Int, | ||
) : Parcelable, FilterUiState { | ||
|
||
companion object { | ||
|
||
fun createFrom(costCategory: Filter.Cost) = CostUiState( | ||
name = costCategory.name, | ||
type = costCategory.type | ||
) | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
app/src/main/java/com/bestapp/rice/model/MeetingUiState.kt
This file contains 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,45 @@ | ||
package com.bestapp.rice.model | ||
|
||
import android.os.Parcelable | ||
import com.bestapp.rice.data.model.remote.Meeting | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class MeetingUiState( | ||
val meetingDocumentID: String, | ||
val title: String, | ||
val titleImage: String, | ||
val placeLocationUiState: PlaceLocationUiState, | ||
val time: String, | ||
val recruits: Int, | ||
val description: String, | ||
val mainMenu: String, | ||
val costValueByPerson: Int, | ||
val costTypeByPerson: Int, | ||
val host: String, | ||
val members: List<String>, | ||
val pendingMembers: List<String>, | ||
val attendanceCheck: List<String>, | ||
val activation: Boolean, | ||
) : Parcelable { | ||
|
||
companion object { | ||
fun createFrom(meeting: Meeting) = MeetingUiState( | ||
meetingDocumentID = meeting.meetingDocumentID, | ||
title = meeting.title, | ||
titleImage = meeting.titleImage, | ||
placeLocationUiState = PlaceLocationUiState.createFrom(meeting.placeLocation), | ||
time = meeting.time, | ||
recruits = meeting.recruits, | ||
description = meeting.description, | ||
mainMenu = meeting.mainMenu, | ||
costValueByPerson = meeting.costValueByPerson, | ||
costTypeByPerson = meeting.costTypeByPerson, | ||
host = meeting.host, | ||
members = meeting.members, | ||
pendingMembers = meeting.pendingMembers, | ||
attendanceCheck = meeting.attendanceCheck, | ||
activation = meeting.activation, | ||
) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/bestapp/rice/model/PlaceLocationUiState.kt
This file contains 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,21 @@ | ||
package com.bestapp.rice.model | ||
|
||
import android.os.Parcelable | ||
import com.bestapp.rice.data.model.remote.PlaceLocation | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class PlaceLocationUiState( | ||
val locationAddress: String, | ||
val locationLat: String, | ||
val locationLong: String, | ||
) : Parcelable { | ||
|
||
companion object { | ||
fun createFrom(placeLocation: PlaceLocation) = PlaceLocationUiState( | ||
locationAddress = placeLocation.locationAddress, | ||
locationLat = placeLocation.locationLat, | ||
locationLong = placeLocation.locationLong, | ||
) | ||
} | ||
} |
This file contains 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,18 @@ | ||
package com.bestapp.rice.model | ||
|
||
import android.os.Parcelable | ||
import com.bestapp.rice.data.model.remote.Post | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class PostUiState( | ||
val postDocumentID: String, | ||
val images: List<String>, | ||
) : Parcelable { | ||
companion object { | ||
fun createFrom(post: Post) = PostUiState( | ||
postDocumentID = post.postDocumentID, | ||
images = post.images, | ||
) | ||
} | ||
} |
Oops, something went wrong.