Skip to content

Commit d54f65c

Browse files
authored
Merge pull request #80 from ttoklip/develop
메인업데이트
2 parents 55ffba5 + 5febf23 commit d54f65c

File tree

189 files changed

+4695
-2918
lines changed

Some content is hidden

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

189 files changed

+4695
-2918
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ build
1212
captures
1313
.externalNativeBuild
1414
.cxx
15+
google-services.json
1516
local.properties
1617
.idea
1718
constant.xml

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
![in1.png](https://raw.githubusercontent.com/ttoklip/BackEnd/main/introduce/in1.png)
2+
3+
![in2.png](https://raw.githubusercontent.com/ttoklip/BackEnd/main/introduce/in2.png)
4+
5+
![in3.png](https://raw.githubusercontent.com/ttoklip/BackEnd/main/introduce/in3.png)
6+
7+
![in4.png](https://raw.githubusercontent.com/ttoklip/BackEnd/main/introduce/in4.png)
8+
9+
10+
## 아키텍쳐
11+
<img width="755" alt="hangunhee39_ttoklip_architecure" src="https://github.com/ttoklip/Android/assets/77563098/c3640f5d-ea24-46bd-807b-023127e81ea0">
12+
13+
14+
## 맴버
15+
| [한건희](https://github.com/hangunhee39) | [김규진](https://github.com/kyujin0911) | [박승연](https://github.com/40food) | [심영수](https://github.com/posite) |
16+
|:------------------------------------------------------------------:|:------------------------------------------------------------------:|:------------------------------------------------------------------:|:---------------------------------------------------------------:|
17+
| 24.01. ~ | 24.01. ~ | 24.01. ~ | 24.01. ~ 24.02. |

app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
id 'kotlin-kapt'
55
id 'com.google.dagger.hilt.android'
66
id 'dagger.hilt.android.plugin'
7+
id 'com.google.gms.google-services'
78
}
89

910
Properties properties = new Properties()
@@ -119,6 +120,9 @@ dependencies {
119120
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.6'
120121
implementation 'androidx.navigation:navigation-ui-ktx:2.7.6'
121122

123+
implementation platform('com.google.firebase:firebase-bom:32.7.2')
124+
implementation 'com.google.firebase:firebase-messaging-ktx'
125+
122126
//flexBox(flexLayout)
123127
implementation 'com.google.android.flexbox:flexbox:3.0.0'
124128

app/src/main/AndroidManifest.xml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<uses-permission android:name="android.permission.CAMERA" />
1111
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
1212
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
13+
<uses-permission
14+
android:name="android.permission.POST_NOTIFICATIONS"
15+
android:minSdkVersion="33" />
1316

1417
<application
1518
android:name=".TtoklipApplication"
@@ -23,6 +26,7 @@
2326
android:theme="@style/Theme.Ttoklip"
2427
android:usesCleartextTraffic="true"
2528
tools:targetApi="31"
29+
android:enableOnBackInvokedCallback="true"
2630
android:requestLegacyExternalStorage="true">
2731

2832
<meta-data
@@ -103,35 +107,46 @@
103107
android:name=".presentation.signup.SignupActivity"
104108
android:exported="false" />
105109
<activity
106-
android:name=".presentation.hometown.TogetherActivity"
110+
android:name=".presentation.hometown.together.TogetherActivity"
107111
android:screenOrientation="portrait"
108112
android:exported="false" />
109113
<activity
110-
android:name=".presentation.hometown.CommunicationActivity"
114+
android:name=".presentation.hometown.communication.CommunicationActivity"
111115
android:screenOrientation="portrait"
112116
android:exported="false" />
113117
<activity
114-
android:name=".presentation.hometown.WriteTogetherActivity"
118+
android:name=".presentation.hometown.together.write.WriteTogetherActivity"
115119
android:screenOrientation="portrait"
116120
android:windowSoftInputMode="adjustPan"
117121
android:exported="false" />
118122
<activity
119-
android:name=".presentation.hometown.WriteCommunicationActivity"
123+
android:name=".presentation.hometown.communication.write.WriteCommunicationActivity"
120124
android:screenOrientation="portrait"
121125
android:windowSoftInputMode="adjustPan"
122126
android:exported="false" />
123127
<activity
124-
android:name=".presentation.hometown.ReadCommunicationActivity"
128+
android:name=".presentation.hometown.communication.read.ReadCommunicationActivity"
125129
android:screenOrientation="portrait"
126130
android:windowSoftInputMode="adjustPan"
127-
android:exported="false" />
131+
android:exported="true" />
128132
<activity
129133
android:name=".presentation.hometown.TradeLocationActivity"
130134
android:screenOrientation="portrait"
131135
android:windowSoftInputMode="adjustPan"
132136
android:exported="false" />
137+
138+
<activity
139+
android:name=".presentation.otheruser.OtherUserActivity"
140+
android:screenOrientation="portrait"
141+
android:windowSoftInputMode="adjustPan"
142+
android:exported="false" />
143+
<activity
144+
android:name=".presentation.otheruser.OtherTipActivity"
145+
android:screenOrientation="portrait"
146+
android:windowSoftInputMode="adjustPan"
147+
android:exported="false" />
133148
<activity
134-
android:name=".presentation.hometown.ReadTogetherActivity"
149+
android:name=".presentation.hometown.together.read.ReadTogetherActivity"
135150
android:screenOrientation="portrait"
136151
android:windowSoftInputMode="adjustPan"
137152
android:exported="false" />
@@ -221,6 +236,15 @@
221236

222237
<activity android:name=".presentation.honeytip.read.ReadQuestionActivity" />
223238

239+
<service
240+
android:name=".util.TtoklipFirebaseMessagingService"
241+
android:enabled="true"
242+
android:exported="true"
243+
android:stopWithTask="false">
244+
<intent-filter>
245+
<action android:name="com.google.firebase.MESSAGING_EVENT" />
246+
</intent-filter>
247+
</service>
224248
</application>
225249

226250
</manifest>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.umc.ttoklip.data.api
2+
3+
import com.umc.ttoklip.data.model.CommonResponse
4+
import com.umc.ttoklip.data.model.ResponseBody
5+
import com.umc.ttoklip.data.model.fcm.FCMTokenRequest
6+
import retrofit2.Response
7+
import retrofit2.http.Body
8+
import retrofit2.http.PATCH
9+
10+
interface FCMApi {
11+
@PATCH("/api/v1/notification/fcm_token")
12+
suspend fun patchFCMToken(
13+
@Body request : FCMTokenRequest
14+
): Response<ResponseBody<CommonResponse>>
15+
}

app/src/main/java/com/umc/ttoklip/data/api/HomeApi.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ package com.umc.ttoklip.data.api
22

33
import com.umc.ttoklip.data.model.ResponseBody
44
import com.umc.ttoklip.data.model.home.HomeResponse
5+
import com.umc.ttoklip.data.model.home.NotificationResponse
56
import retrofit2.Response
67
import retrofit2.http.GET
8+
import retrofit2.http.Query
79

810
interface HomeApi {
911

1012
@GET("/api/v1/home")
1113
suspend fun getHomeMainApi(): Response<ResponseBody<HomeResponse>>
1214

15+
@GET("/api/v1/notification/my-notification")
16+
suspend fun getNotifications(
17+
@Query("notificationCategory") category: String
18+
): Response<ResponseBody<NotificationResponse>>
19+
1320
}

app/src/main/java/com/umc/ttoklip/data/api/HoneyTipApi.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface HoneyTipApi {
3333
@Part("title") title: RequestBody,
3434
@Part("content") content: RequestBody,
3535
@Part("category") category: RequestBody,
36-
@Part images: Array<MultipartBody.Part>,
36+
@Part images: List<MultipartBody.Part?>,
3737
@Part("url") url: RequestBody
3838
): Response<ResponseBody<CreateHoneyTipResponse>>
3939

@@ -68,7 +68,7 @@ interface HoneyTipApi {
6868
@Part("title") title: RequestBody,
6969
@Part("content") content: RequestBody,
7070
@Part("category") category: RequestBody,
71-
@Part images: Array<MultipartBody.Part>,
71+
@Part images: List<MultipartBody.Part?>,
7272
@Part("url") url: RequestBody
7373
): Response<ResponseBody<CreateHoneyTipResponse>>
7474

@@ -96,7 +96,7 @@ interface HoneyTipApi {
9696
@Part("title") title: RequestBody,
9797
@Part("content") content: RequestBody,
9898
@Part("category") category: RequestBody,
99-
@Part images: Array<MultipartBody.Part>
99+
@Part images: List<MultipartBody.Part?>
100100
): Response<ResponseBody<CreateHoneyTipResponse>>
101101

102102
@GET("/api/v1/question/post/{postId}")

app/src/main/java/com/umc/ttoklip/data/api/KakaoApi.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ package com.umc.ttoklip.data.api
22

33
import com.umc.ttoklip.R
44
import com.umc.ttoklip.data.model.KakaoResponse
5+
import com.umc.ttoklip.data.model.ResponseBody
6+
import com.umc.ttoklip.data.model.login.LoginResponse
57
import retrofit2.Call
8+
import retrofit2.Response
69
import retrofit2.http.GET
710
import retrofit2.http.Header
811
import retrofit2.http.Query
@@ -12,5 +15,5 @@ interface KakaoApi {
1215
fun getSearchKeyword(
1316
@Header("Authorization") key: String,
1417
@Query("query") query:String
15-
): Call<KakaoResponse.ResultSearchKeyword>
18+
): Response<ResponseBody<KakaoResponse.ResultSearchKeyword>>
1619
}

app/src/main/java/com/umc/ttoklip/data/api/MyAccountRestrictApi.kt

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/src/main/java/com/umc/ttoklip/data/api/MyBlockUserApi.kt renamed to app/src/main/java/com/umc/ttoklip/data/api/MyPage3Api.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@ package com.umc.ttoklip.data.api
22

33
import com.umc.ttoklip.data.model.ResponseBody
44
import com.umc.ttoklip.data.model.mypage.MyBlockUserResponse
5+
import com.umc.ttoklip.data.model.mypage.NoticeResponse
6+
import com.umc.ttoklip.data.model.mypage.RestrictedResponse
57
import retrofit2.Response
68
import retrofit2.http.DELETE
79
import retrofit2.http.GET
810
import retrofit2.http.Path
911

10-
interface MyBlockUserApi {
12+
interface MyPage3Api {
13+
@GET("/api/v1/my-page/restricted")
14+
suspend fun getRestrictedReason(): Response<ResponseBody<RestrictedResponse>>
15+
1116
@GET("/api/v1/my-page/blocked")
1217
suspend fun getMyBlockedUser(): Response<ResponseBody<MyBlockUserResponse>>
1318

1419
@DELETE("/api/v1/my-page/unblock/{targetId}")
1520
suspend fun deleteBlockUser(@Path("targetId") userId: Long): Response<ResponseBody<Unit>>
1621

22+
@GET("api/v1/notice")
23+
suspend fun getNotices(): Response<ResponseBody<NoticeResponse>>
1724
}

0 commit comments

Comments
 (0)