From 3ac2f13911dc1cc45e0755000dbe825939f964b5 Mon Sep 17 00:00:00 2001 From: blueme0 Date: Wed, 14 Feb 2024 15:57:29 +0900 Subject: [PATCH 01/31] =?UTF-8?q?[fix/#153]=20=ED=86=A0=ED=81=B0=20?= =?UTF-8?q?=EB=A6=AC=ED=94=84=EB=A0=88=EC=8B=9C=20url=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/teumteum/data/interceptor/AuthInterceptor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/data/src/main/java/com/teumteum/data/interceptor/AuthInterceptor.kt b/core/data/src/main/java/com/teumteum/data/interceptor/AuthInterceptor.kt index 7fc7e5e1..0e3d816b 100644 --- a/core/data/src/main/java/com/teumteum/data/interceptor/AuthInterceptor.kt +++ b/core/data/src/main/java/com/teumteum/data/interceptor/AuthInterceptor.kt @@ -29,7 +29,7 @@ class AuthInterceptor @Inject constructor( try { Timber.tag("만료된 토큰").d("accessToken: ${dataStore.userToken}, refreshToken: ${dataStore.refreshToken}") val refreshTokenRequest = originalRequest.newBuilder().post("".toRequestBody()) - .url("$BASE_URL/auth/reissues") + .url("${BASE_URL}auth/reissues") .addHeader(HEADER_AUTHORIZATION, dataStore.userToken) .addHeader(HEADER_REFRESH_TOKEN, dataStore.refreshToken) .build() From b3cce40d85ff03f833c54719f2144d916bfa16f4 Mon Sep 17 00:00:00 2001 From: Minseo <100370200+Mnseo@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:24:29 +0900 Subject: [PATCH 02/31] Update README.md --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 186a3570..c706cbff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ - # TeumTeum-Android Repository + # 🤝 IT 커리어 성장형 네트워킹 서비스, 틈틈 -![2046](https://github.com/depromeet/TeumTeum-Android/assets/89737271/6a51c5f5-f809-4a2d-a8d3-684b82e80afc) +![tt1](https://github.com/depromeet/TeumTeum-Android/assets/100370200/5230940d-be49-46d0-a0ff-d88ecd4f9604)
@@ -10,3 +10,65 @@ ||||| |**모임 참여 & 유저 리뷰**|**공통 관심사 찾기**|**모임 생성 & 마이페이지**|**로그인 & 자기소개 카드**| +
+ +## 틈틈을 소개합니다 🎉 + +틈틈은 IT 업계에서 커리어 성장을 위해 노력하는 '갓생러'들을 만날 수 있는 네트워킹 플랫폼이에요. +함께 스터디를 하거나 모여서 각자 작업을 하며 다양한 네트워킹 활동을 할 수 있어요. + +처음 만나는 사이라 어색함이 느껴질 때는 '친해지기' 기능을 활용해 관심사를 파악하고, +함께 즐겁게 대화를 나누며 서로의 틈을 채워 가까워질 수 있어요! + +IT 직군의 다양한 개성을 지닌 사람들과 네트워킹하며 커리어를 성장시켜 보는 것은 어떨까요? + +
+ +## 틈틈을 처음 사용하시나요? 😎 +![Untitled](https://github.com/depromeet/TeumTeum-Android/assets/100370200/7ce79833-06aa-40a3-afd1-18f0dc37601b) + +### ☝️ Step 01 소개서를 만들고 간편하게 소개해 보세요 +- 관심사와 목표가 담겨 있는 소개서를 만들어요. +- 모임에 참여할 때 소개서로 간편하게 자신을 소개 할 수 있어요. + +
+ +![Untitled2](https://github.com/depromeet/TeumTeum-Android/assets/100370200/4d716950-d3c8-47b0-bef5-890396188598) + +### ✌️ Step 02 원하는 모임에 참여해 보세요 +- 틈틈에서는 스터디부터 모각작까지 다양한 카테고리의 모임에 참여할 수 있어요. +- 참여자들의 소개서를 미리 확인하고, 믿을 수 있는 모임을 시작해 보세요. + +
+ +![Untitled3](https://github.com/depromeet/TeumTeum-Android/assets/100370200/a455a546-b573-4470-ba27-80fb49184cc9) + +### 🤟 Step 03 함께 성장할 근처의 친구를 찾아봐요 +- 내가 사는 곳 근처, 혹은 회사 근처에서 친구를 만날 수 있어요. +- 내 주변의 친구와 함께 커리어 성장을 위한 모임을 시작해 보세요. + +
+ +![Untitled4](https://github.com/depromeet/TeumTeum-Android/assets/100370200/97252e07-9822-4c40-abd0-dcb153524c0c) + +### 🤟 Step 04 서로의 관심사를 발견해요 +- 소개서에 작성한 관심사를 기반으로 모임 참여자들의 관심사를 확인해 보세요. +- 기기를 흔들면 모임 참여자들의 다양한 관심사 사이의 틈을 채울 수 있어요. +- chat GPT가 많은 사람들이 공통적으로 관심을 가지고 있는 주제를 알려줄거에요. + + +
+ +![Untitled5](https://github.com/depromeet/TeumTeum-Android/assets/100370200/432f3ec9-32d1-4749-badb-7a49cec6ec12) + +### 🖖 Step 05 밸런스 게임으로 친해져요 +- 공통 관심사와 관련된 다양한 대화 주제를 확인하고, 대화를 시작해봐요. +- 어색한 순간도 잠시, 밸런스 게임을 통해 빠르게 친해질 수 있어요. + +
+ +![Untitled6](https://github.com/depromeet/TeumTeum-Android/assets/100370200/1a5d824f-5231-419f-a9ed-813128b247a0) + +### 🖖 Step 06 모임 후 리뷰를 통해 더 나은 네트워킹 환경을 만들어가요 +- 모임이 끝난 후 다음날에 유저 리뷰를 작성할 수 있어요. +- 유저 리뷰를 작성하고 더 나은 네트워킹 환경을 만들어봐요. From 99a241f01350415f1e942d49d4c42c7bebf16069 Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Wed, 14 Feb 2024 17:09:38 +0900 Subject: [PATCH 03/31] [setting/#152] release_builder.yml --- .github/workflows/release_builder.yml | 83 +++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/release_builder.yml diff --git a/.github/workflows/release_builder.yml b/.github/workflows/release_builder.yml new file mode 100644 index 00000000..3866e58c --- /dev/null +++ b/.github/workflows/release_builder.yml @@ -0,0 +1,83 @@ +name: TeumTeum Push Builder + +on: + push: + branches: [ main ] + +defaults: + run: + shell: bash + working-directory: . + +jobs: + build: + name: APK Builder When Push + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Gradle cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Change gradlew permissions + run: chmod +x ./gradlew + + - name: Create Local Properties + run: touch local.properties + + - name: Access Local Properties + env: + base_url: ${{ secrets.BASE_URL }} + image_url: ${{ secrets.IMAGE_URL }} + kakao_redirect_url: ${{ secrets.KAKAO_REDIRECT_URL }} + naver_redirect_url: ${{ secrets.KAKAO_REDIRECT_URL }} + kakao_api_key: ${{ secrets.KAKAO_API_KEY }} + naver_api_key: ${{ secrets.NAVER_API_KEY }} + run: | + echo base.url=\"$base_url\" >> local.properties + echo image.url=\"$image_url\" >> local.properties + echo kakao.redirect=\"$kakao_redirect_url\" >> local.properties + echo naver.redirect=\"$naver_redirect_url\" >> local.properties + echo kakao.key=\"$kakao_api_key\" >> local.properties + echo naver.key=\"$naver_api_key\" >> local.properties + + - name: Access Firebase Service + run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json + + - name: Build release APK + run: ./gradlew assembleRelease --stacktrace + + - name: On Success + if: ${{ success() }} + uses: MeilCli/slack-upload-file@v1 + with: + slack_token: ${{ secrets.SLACK_BOT_TOKEN}} + channels: ${{ secrets.SLACK_CHANNEL_ID }} + file_path: 'app/build/outputs/apk/release/app-release.apk' + file_name: 'TeumTeum.apk' + file_type: 'apk' + initial_comment: '🎉 TeumTeum이 슬랙으로 들어왔습니다.' + + - name: On Failed, Notify in Slack + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: '#ff0000' + SLACK_ICON: https://play-lh.googleusercontent.com/jUeDnP2wd29y48wolu5a8j08PX3Zt-wsftTVuSR8gYgHI00sq7Zsq2jWx1icTdsISw=w240-h480-rw + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_TITLE: 'TEUMTEUM/Android Release build Fail❌' + MSG_MINIMAL: true + SLACK_USERNAME: TEUMTEUM_ANDROID + SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' From 957ce82347acec26066fb951882288330bf8f7ba Mon Sep 17 00:00:00 2001 From: Minseo <100370200+Mnseo@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:10:19 +0900 Subject: [PATCH 04/31] Update README.md --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c706cbff..f894d1f1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ - # 🤝 IT 커리어 성장형 네트워킹 서비스, 틈틈 + # 🤝 TEUM TEUM ![tt1](https://github.com/depromeet/TeumTeum-Android/assets/100370200/5230940d-be49-46d0-a0ff-d88ecd4f9604) +``` +📌 IT 커리어 성장형 네트워킹 서비스, 틈틈 +```
## Contributors @@ -24,6 +27,57 @@ IT 직군의 다양한 개성을 지닌 사람들과 네트워킹하며 커리
+## Tech Stack ⚒️ +- Clean Architecture +- Multi-Module + +- MVVM +- Repository Pattern + +- Compose + XML +- Hilt + +- Coroutine +- Version Catalog + +- Kotlin - Flow +- GitHub Action CI / CD + +
+ +## System Architecture 💻 + +### Architecture (with Data flow) +![image](https://github.com/depromeet/TeumTeum-Android/assets/100370200/e1442bad-dd8a-464b-a1cb-d719253ab410) + +### MOUDLE +``` +🗃️app + ┣ 📂di + ┣ 📂presentation + ┣ 📂util +🗃️build-logic + ┣ 📂convention +🗃️core + ┣ 📂base +🗃️data + ┣ 📂datasource + ┣ 📂local + ┣ 📂model + ┃ ┣ 📂response + ┃ ┣ 📂request + ┣ 📂repository + ┣ 📂remote + ┃ ┣ 📂interceptor + ┃ ┣ 📂service + ┣ 📂util +🗃️domain + ┣ 📂entity + ┣ 📂repository +``` +
+ + ## 틈틈을 처음 사용하시나요? 😎 ![Untitled](https://github.com/depromeet/TeumTeum-Android/assets/100370200/7ce79833-06aa-40a3-afd1-18f0dc37601b) From f878d9cd0d7924b7260b97039f5584e8e67645c8 Mon Sep 17 00:00:00 2001 From: Minseo <100370200+Mnseo@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:14:29 +0900 Subject: [PATCH 05/31] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f894d1f1..8d4dae7b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ - # 🤝 TEUM TEUM + # 🤝 [TEUM TEUM](https://play.google.com/store/apps/details?id=com.teumteum.teumteum) ![tt1](https://github.com/depromeet/TeumTeum-Android/assets/100370200/5230940d-be49-46d0-a0ff-d88ecd4f9604) ``` 📌 IT 커리어 성장형 네트워킹 서비스, 틈틈 ``` +
## Contributors From c1252d7c3dc410817a40e55bde546d47a08b2255 Mon Sep 17 00:00:00 2001 From: Minseo <100370200+Mnseo@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:29:39 +0900 Subject: [PATCH 06/31] Update README.md --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8d4dae7b..dcba72d9 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,6 @@
-## 틈틈을 소개합니다 🎉 - -틈틈은 IT 업계에서 커리어 성장을 위해 노력하는 '갓생러'들을 만날 수 있는 네트워킹 플랫폼이에요. -함께 스터디를 하거나 모여서 각자 작업을 하며 다양한 네트워킹 활동을 할 수 있어요. - -처음 만나는 사이라 어색함이 느껴질 때는 '친해지기' 기능을 활용해 관심사를 파악하고, -함께 즐겁게 대화를 나누며 서로의 틈을 채워 가까워질 수 있어요! - -IT 직군의 다양한 개성을 지닌 사람들과 네트워킹하며 커리어를 성장시켜 보는 것은 어떨까요? - -
- ## Tech Stack ⚒️ - Clean Architecture - Multi-Module @@ -49,7 +37,7 @@ IT 직군의 다양한 개성을 지닌 사람들과 네트워킹하며 커리 ## System Architecture 💻 ### Architecture (with Data flow) -![image](https://github.com/depromeet/TeumTeum-Android/assets/100370200/e1442bad-dd8a-464b-a1cb-d719253ab410) + ### MOUDLE ``` @@ -76,8 +64,20 @@ IT 직군의 다양한 개성을 지닌 사람들과 네트워킹하며 커리 ┣ 📂entity ┣ 📂repository ``` +
+## 틈틈을 소개합니다 🎉 + +틈틈은 IT 업계에서 커리어 성장을 위해 노력하는 '갓생러'들을 만날 수 있는 네트워킹 플랫폼이에요. +함께 스터디를 하거나 모여서 각자 작업을 하며 다양한 네트워킹 활동을 할 수 있어요. + +처음 만나는 사이라 어색함이 느껴질 때는 '친해지기' 기능을 활용해 관심사를 파악하고, +함께 즐겁게 대화를 나누며 서로의 틈을 채워 가까워질 수 있어요! + +IT 직군의 다양한 개성을 지닌 사람들과 네트워킹하며 커리어를 성장시켜 보는 것은 어떨까요? + +
## 틈틈을 처음 사용하시나요? 😎 ![Untitled](https://github.com/depromeet/TeumTeum-Android/assets/100370200/7ce79833-06aa-40a3-afd1-18f0dc37601b) From be22dd9a7cacfc2ce2d81e1379dfddada0f39243 Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Wed, 14 Feb 2024 17:43:54 +0900 Subject: [PATCH 07/31] =?UTF-8?q?[setting]=20Github=20Action=20CD=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release_builder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_builder.yml b/.github/workflows/release_builder.yml index 3866e58c..cfdb276a 100644 --- a/.github/workflows/release_builder.yml +++ b/.github/workflows/release_builder.yml @@ -65,7 +65,7 @@ jobs: with: slack_token: ${{ secrets.SLACK_BOT_TOKEN}} channels: ${{ secrets.SLACK_CHANNEL_ID }} - file_path: 'app/build/outputs/apk/release/app-release.apk' + file_path: 'app/release/app-release.apk' file_name: 'TeumTeum.apk' file_type: 'apk' initial_comment: '🎉 TeumTeum이 슬랙으로 들어왔습니다.' From 6d416875348a48498c17dbad240b55d76ca8ca7d Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Wed, 14 Feb 2024 17:56:25 +0900 Subject: [PATCH 08/31] =?UTF-8?q?[setting]=20debug=5Fbuilder.yml=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/{release_builder.yml => debug_builder.yml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{release_builder.yml => debug_builder.yml} (92%) diff --git a/.github/workflows/release_builder.yml b/.github/workflows/debug_builder.yml similarity index 92% rename from .github/workflows/release_builder.yml rename to .github/workflows/debug_builder.yml index cfdb276a..ad70916b 100644 --- a/.github/workflows/release_builder.yml +++ b/.github/workflows/debug_builder.yml @@ -56,8 +56,8 @@ jobs: - name: Access Firebase Service run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json - - name: Build release APK - run: ./gradlew assembleRelease --stacktrace + - name: Build debug APK + run: ./gradlew assembleDebug --stacktrace - name: On Success if: ${{ success() }} @@ -65,7 +65,7 @@ jobs: with: slack_token: ${{ secrets.SLACK_BOT_TOKEN}} channels: ${{ secrets.SLACK_CHANNEL_ID }} - file_path: 'app/release/app-release.apk' + file_path: 'app/build/outputs/apk/debug/app-debug.apk' file_name: 'TeumTeum.apk' file_type: 'apk' initial_comment: '🎉 TeumTeum이 슬랙으로 들어왔습니다.' @@ -77,7 +77,7 @@ jobs: SLACK_COLOR: '#ff0000' SLACK_ICON: https://play-lh.googleusercontent.com/jUeDnP2wd29y48wolu5a8j08PX3Zt-wsftTVuSR8gYgHI00sq7Zsq2jWx1icTdsISw=w240-h480-rw SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_TITLE: 'TEUMTEUM/Android Release build Fail❌' + SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' MSG_MINIMAL: true SLACK_USERNAME: TEUMTEUM_ANDROID SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' From 34b04f7e183959cdcd3a1bcec48555083a743c2c Mon Sep 17 00:00:00 2001 From: Minseo <100370200+Mnseo@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:56:40 +0900 Subject: [PATCH 09/31] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dcba72d9..e544e421 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ ## System Architecture 💻 ### Architecture (with Data flow) +![image](https://github.com/depromeet/TeumTeum-Android/assets/100370200/b914bf6d-d052-46be-ba05-a841673f38c0) ### MOUDLE From 83ac42e4389fa5179d7e64a0a85906d82edd008b Mon Sep 17 00:00:00 2001 From: MinseoShindor Date: Wed, 14 Feb 2024 20:14:50 +0900 Subject: [PATCH 10/31] =?UTF-8?q?[feat/#118]=20signUpUtils=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 --- .../mypage/recommend/RecommendScreen.kt | 5 +- .../setting/viewModel/MyPageViewModel.kt | 50 ++----------------- .../com/teumteum/teumteum/util/SignupUtils.kt | 15 ++++++ 3 files changed, 21 insertions(+), 49 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendScreen.kt b/app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendScreen.kt index 53d171f4..9f4ab62d 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendScreen.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendScreen.kt @@ -20,7 +20,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState -import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Alignment @@ -40,8 +39,8 @@ import com.teumteum.teumteum.presentation.mypage.setting.viewModel.MyPageViewMod import com.teumteum.teumteum.presentation.mypage.setting.viewModel.Recommend import com.teumteum.teumteum.presentation.mypage.setting.viewModel.RecommendDetailViewModel import com.teumteum.teumteum.presentation.mypage.setting.viewModel.UserInfoUiState -import com.teumteum.teumteum.presentation.mypage.setting.viewModel.SettingViewModel import com.teumteum.teumteum.presentation.mypage.setting.viewModel.toRecommend +import com.teumteum.teumteum.util.SignupUtils @Composable @@ -125,7 +124,7 @@ fun RecommendItem(recommend: Recommend, myPageViewModel: MyPageViewModel, navCon horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { - RecommendRow(recommend = recommend, list= myPageViewModel.friendCharacterList) + RecommendRow(recommend = recommend, list= SignupUtils.CHARACTER_FRIEND_LIST) recommend.jobName?.let { Text( text = it, diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/mypage/setting/viewModel/MyPageViewModel.kt b/app/src/main/java/com/teumteum/teumteum/presentation/mypage/setting/viewModel/MyPageViewModel.kt index 14eb3f5e..dfd31b98 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/mypage/setting/viewModel/MyPageViewModel.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/mypage/setting/viewModel/MyPageViewModel.kt @@ -11,6 +11,8 @@ import com.teumteum.domain.entity.UserInfo import com.teumteum.domain.repository.AuthRepository import com.teumteum.domain.repository.UserRepository import com.teumteum.teumteum.R +import com.teumteum.teumteum.util.SignupUtils.CHARACTER_CARD_LIST +import com.teumteum.teumteum.util.SignupUtils.CHARACTER_CARD_LIST_BACK import com.teumteum.teumteum.util.custom.view.model.BackCard import com.teumteum.teumteum.util.custom.view.model.FrontCard import dagger.hilt.android.lifecycle.HiltViewModel @@ -112,8 +114,8 @@ class MyPageViewModel @Inject constructor( userRepository.getMyInfoFromServer() .onSuccess { _userInfoState.value = UserInfoUiState.Success(it) - val frontCardData = userInfoToFrontCard(it, characterList) - val backCardData = userInfoToBackCard(it, characterListBack) + val frontCardData = userInfoToFrontCard(it, CHARACTER_CARD_LIST) + val backCardData = userInfoToBackCard(it, CHARACTER_CARD_LIST_BACK) _userInfoState.value = UserInfoUiState.Success(it) _frontCardState.value = frontCardData _backCardState.value = backCardData @@ -123,50 +125,6 @@ class MyPageViewModel @Inject constructor( } } } - val characterList: HashMap = hashMapOf( - 0 to R.drawable.ic_card_front_ghost, - 1 to R.drawable.ic_card_front_star, - 2 to R.drawable.ic_card_front_bear, - 3 to R.drawable.ic_card_front_raccon, - 4 to R.drawable.ic_card_front_cat, - 5 to R.drawable.ic_card_front_rabbit, - 6 to R.drawable.ic_card_front_fox, - 7 to R.drawable.ic_card_front_water, - 8 to R.drawable.ic_card_front_penguin, - 9 to R.drawable.ic_card_front_dog, - 10 to R.drawable.ic_card_front_mouse, - 11 to R.drawable.ic_card_front_panda - ) - - val characterListBack: HashMap = hashMapOf( - 0 to R.drawable.ic_card_back_ghost, - 1 to R.drawable.ic_card_back_star, - 2 to R.drawable.ic_card_back_bear, - 3 to R.drawable.ic_card_back_raccon, - 4 to R.drawable.ic_card_back_cat, - 5 to R.drawable.ic_card_back_rabbit, - 6 to R.drawable.ic_card_back_fox, - 7 to R.drawable.ic_card_back_water, - 8 to R.drawable.ic_card_back_penguin, - 9 to R.drawable.ic_card_back_dog, - 10 to R.drawable.ic_card_back_mouse, - 11 to R.drawable.ic_card_back_panda - ) - - val friendCharacterList: HashMap = hashMapOf( - 0 to R.drawable.ic_ghost, - 1 to R.drawable.ic_star_character, - 2 to R.drawable.ic_bear, - 3 to R.drawable.ic_raccoon, - 4 to R.drawable.ic_cat, - 5 to R.drawable.ic_rabbit, - 6 to R.drawable.ic_fox, - 7 to R.drawable.ic_water, - 8 to R.drawable.ic_penguin, - 9 to R.drawable.ic_dog, - 10 to R.drawable.ic_mouse, - 11 to R.drawable.ic_panda - ) fun userInfoToFrontCard(userInfo: UserInfo, characterList: HashMap): FrontCard { return FrontCard( diff --git a/app/src/main/java/com/teumteum/teumteum/util/SignupUtils.kt b/app/src/main/java/com/teumteum/teumteum/util/SignupUtils.kt index 407fefb7..a7ded0ee 100644 --- a/app/src/main/java/com/teumteum/teumteum/util/SignupUtils.kt +++ b/app/src/main/java/com/teumteum/teumteum/util/SignupUtils.kt @@ -37,6 +37,21 @@ object SignupUtils { 11 to R.drawable.ic_card_back_panda ) + val CHARACTER_FRIEND_LIST: HashMap = hashMapOf( + 0 to R.drawable.ic_ghost, + 1 to R.drawable.ic_star_character, + 2 to R.drawable.ic_bear, + 3 to R.drawable.ic_raccoon, + 4 to R.drawable.ic_cat, + 5 to R.drawable.ic_rabbit, + 6 to R.drawable.ic_fox, + 7 to R.drawable.ic_water, + 8 to R.drawable.ic_penguin, + 9 to R.drawable.ic_dog, + 10 to R.drawable.ic_mouse, + 11 to R.drawable.ic_panda + ) + const val JOB_DESIGN = "디자인" const val JOB_DEVELOPMENT = "개발" const val JOB_PLANNING = "기획" From 71e31fd2322e35c4492aac2b4599164919aedcc5 Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Wed, 14 Feb 2024 21:14:30 +0900 Subject: [PATCH 11/31] =?UTF-8?q?[setting]=20GithubAction=20CD=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/debug_builder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug_builder.yml b/.github/workflows/debug_builder.yml index ad70916b..d2b146f3 100644 --- a/.github/workflows/debug_builder.yml +++ b/.github/workflows/debug_builder.yml @@ -80,4 +80,4 @@ jobs: SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' MSG_MINIMAL: true SLACK_USERNAME: TEUMTEUM_ANDROID - SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' + SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' \ No newline at end of file From d1b64b72fb749b9a3787fddb089f48d0a7b2e8e4 Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Wed, 14 Feb 2024 21:20:34 +0900 Subject: [PATCH 12/31] =?UTF-8?q?[docs]=20=EC=98=A4=ED=83=80=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 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e544e421..68960e2d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ ![image](https://github.com/depromeet/TeumTeum-Android/assets/100370200/b914bf6d-d052-46be-ba05-a841673f38c0) -### MOUDLE +### MODULE ``` 🗃️app ┣ 📂di From 9d46cb4ffcab72e1720647aa3be3dc015ee99485 Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Wed, 14 Feb 2024 21:48:24 +0900 Subject: [PATCH 13/31] [setting] GithubAction CD TEST --- .github/workflows/debug_builder.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug_builder.yml b/.github/workflows/debug_builder.yml index d2b146f3..3ab9d66c 100644 --- a/.github/workflows/debug_builder.yml +++ b/.github/workflows/debug_builder.yml @@ -80,4 +80,5 @@ jobs: SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' MSG_MINIMAL: true SLACK_USERNAME: TEUMTEUM_ANDROID - SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' \ No newline at end of file + SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' + \ No newline at end of file From 40162e7e1c16f3f5a5239c30809b145c224e15d9 Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Wed, 14 Feb 2024 22:00:09 +0900 Subject: [PATCH 14/31] [setting] GithubAction CD TEST --- .github/workflows/debug_builder.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/debug_builder.yml b/.github/workflows/debug_builder.yml index 3ab9d66c..d2b146f3 100644 --- a/.github/workflows/debug_builder.yml +++ b/.github/workflows/debug_builder.yml @@ -80,5 +80,4 @@ jobs: SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' MSG_MINIMAL: true SLACK_USERNAME: TEUMTEUM_ANDROID - SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' - \ No newline at end of file + SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' \ No newline at end of file From 525c867a9636f12e76611450dddd229a6b6a9f6a Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Wed, 14 Feb 2024 22:17:28 +0900 Subject: [PATCH 15/31] [setting] GithubAction CD TEST --- .github/workflows/debug_builder.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debug_builder.yml b/.github/workflows/debug_builder.yml index d2b146f3..f95d5b05 100644 --- a/.github/workflows/debug_builder.yml +++ b/.github/workflows/debug_builder.yml @@ -64,7 +64,7 @@ jobs: uses: MeilCli/slack-upload-file@v1 with: slack_token: ${{ secrets.SLACK_BOT_TOKEN}} - channels: ${{ secrets.SLACK_CHANNEL_ID }} + channels: ${{ secrets.SLACK_CHANNEL_ID}} file_path: 'app/build/outputs/apk/debug/app-debug.apk' file_name: 'TeumTeum.apk' file_type: 'apk' @@ -80,4 +80,5 @@ jobs: SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' MSG_MINIMAL: true SLACK_USERNAME: TEUMTEUM_ANDROID - SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' \ No newline at end of file + SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' + \ No newline at end of file From 0aaabb99ce3f80927529465e18647b855f2189b6 Mon Sep 17 00:00:00 2001 From: MinseoShindor Date: Thu, 15 Feb 2024 00:41:19 +0900 Subject: [PATCH 16/31] =?UTF-8?q?[docs/#158]=20readme=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 68960e2d..3f0fbcf5 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,31 @@ - # 🤝 [TEUM TEUM](https://play.google.com/store/apps/details?id=com.teumteum.teumteum) - -![tt1](https://github.com/depromeet/TeumTeum-Android/assets/100370200/5230940d-be49-46d0-a0ff-d88ecd4f9604) - -``` -📌 IT 커리어 성장형 네트워킹 서비스, 틈틈 -``` + + +# Teum-Teum + +> 사람 사이의 **틈**을 이어주는 IT 커리어 네트워킹 서비스 `repo:server` + +![Build](https://img.shields.io/github/actions/workflow/status/depromeet/teum-teum-server/integration-tester.yml?branch=develop&style=for-the-badge&logo=github&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/test_success_density/depromeet_teum-teum-server?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/quality_gate/depromeet_teum-teum-server/develop?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/github/v/release/depromeet/teum-teum-server?include_prereleases&style=for-the-badge&color=36B2FF) + +[![download](https://img.shields.io/badge/playstore-download-brightgreen?style=social&logo=googleplay&color=36B2FF)](https://play.google.com/store/apps/details?id=com.teumteum.teumteum&pcampaignid=web_share) [![instagram](https://img.shields.io/badge/instagram-click-brightgreen?style=social&logo=instagram&color=36B2FF)](https://www.instagram.com/teumteum_official/) [![behance](https://img.shields.io/badge/behance-click-brightgreen?style=social&logo=behance&color=36B2FF)](https://www.behance.net/gallery/191510163/%08TEUMTEUM-IT-Career-Growth-Networking-Service) + +--- + +

+ MOBILE_1 + MOBILE_2 +

+

+ MOBILE_3 + MOBILE_4 +

+

+ MOBILE_5 + MOBILE_6 +

+

+ MOBILE_7 + MOBILE_8 +


From 6e1bb505a75a2f300fca6ffdd0187530193179fb Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Thu, 15 Feb 2024 11:43:32 +0900 Subject: [PATCH 17/31] [setting] GithubAction CD TEST --- .github/workflows/debug_builder.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/debug_builder.yml b/.github/workflows/debug_builder.yml index f95d5b05..6cd8d17b 100644 --- a/.github/workflows/debug_builder.yml +++ b/.github/workflows/debug_builder.yml @@ -80,5 +80,4 @@ jobs: SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' MSG_MINIMAL: true SLACK_USERNAME: TEUMTEUM_ANDROID - SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' - \ No newline at end of file + SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' \ No newline at end of file From 3856e730df5cb18bae6d80842fe9ba6fb3f59208 Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Thu, 15 Feb 2024 16:44:16 +0900 Subject: [PATCH 18/31] [setting] GithubAction CD TEST --- .github/workflows/debug_builder.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug_builder.yml b/.github/workflows/debug_builder.yml index 6cd8d17b..f95d5b05 100644 --- a/.github/workflows/debug_builder.yml +++ b/.github/workflows/debug_builder.yml @@ -80,4 +80,5 @@ jobs: SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' MSG_MINIMAL: true SLACK_USERNAME: TEUMTEUM_ANDROID - SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' \ No newline at end of file + SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' + \ No newline at end of file From 819d64b7a3ed84dd9cb0db424d01073a32e2d349 Mon Sep 17 00:00:00 2001 From: blueme0 Date: Thu, 15 Feb 2024 21:23:24 +0900 Subject: [PATCH 19/31] =?UTF-8?q?[fix/#160]=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=EC=9D=B4=EB=A6=84=20input=20error=20case=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../signup/name/GetNameFragment.kt | 20 ++++++++++++++++--- app/src/main/res/layout/fragment_get_name.xml | 12 +++++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/signup/name/GetNameFragment.kt b/app/src/main/java/com/teumteum/teumteum/presentation/signup/name/GetNameFragment.kt index 8dec9030..5fb7c245 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/signup/name/GetNameFragment.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/signup/name/GetNameFragment.kt @@ -2,6 +2,7 @@ package com.teumteum.teumteum.presentation.signup.name import android.os.Bundle import android.text.Editable +import android.text.InputFilter import android.text.TextWatcher import android.view.View import androidx.fragment.app.activityViewModels @@ -26,6 +27,7 @@ class GetNameFragment binding.vm = viewModel binding.lifecycleOwner = this + binding.etName.filters = arrayOf(filterAlphaNumSpace) setTextChangedListener() checkValidinput() } @@ -44,18 +46,30 @@ class GetNameFragment }) } + private var filterAlphaNumSpace = InputFilter { source, _, _, _, _, _ -> + val ps = Pattern.compile(REGEX_NAME_PATTERN_WRITING) + if (!ps.matcher(source).matches()) { + "" + } else source + } + private fun checkValidinput() { lifecycleScope.launch { viewModel.userName.collect { userName -> - if (Pattern.matches(REGEX_NAME_PATTERN, userName) && userName.trim().length >= 2) + if (Pattern.matches(REGEX_NAME_PATTERN_SUBMIT, userName) && userName.trim().length >= 2) { (activity as SignUpActivity).activateNextButton() - else + binding.tvCaption.visibility = View.INVISIBLE + } + else { (activity as SignUpActivity).disableNextButton() + binding.tvCaption.visibility = View.VISIBLE + } } } } companion object { - private const val REGEX_NAME_PATTERN = "^([가-힣]*)\$" + private const val REGEX_NAME_PATTERN_SUBMIT = "^([가-힣]*)\$" + private const val REGEX_NAME_PATTERN_WRITING = "^[ㄱ-ㅣ가-힣]+$" } } \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_get_name.xml b/app/src/main/res/layout/fragment_get_name.xml index 314620b8..0eb0b8f3 100644 --- a/app/src/main/res/layout/fragment_get_name.xml +++ b/app/src/main/res/layout/fragment_get_name.xml @@ -79,5 +79,17 @@ app:layout_constraintTop_toBottomOf="@id/tv_name" /> + + \ 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 3947a0ae..ac95967c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -57,6 +57,7 @@ 틈틈은 신뢰 기반 커뮤니티로 실명으로\n대화하고 있어요 이름 실명을 입력해주세요 + 형식이 올바르지 않아요. 생일이 언제인가요? 또래와 함께하는 맞춤형 모임을 추천해 드려요 2000년 From a8216ec028bee9933731e594d3d6b7f0f2a3582e Mon Sep 17 00:00:00 2001 From: blueme0 Date: Thu, 15 Feb 2024 22:38:08 +0900 Subject: [PATCH 20/31] =?UTF-8?q?[fix/#160]=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EC=88=98=EC=8B=A0=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teumteum/teumteum/config/TeumMessagingService.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt b/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt index d22a921d..e32ea452 100644 --- a/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt +++ b/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt @@ -12,6 +12,7 @@ import com.teumteum.data.model.request.toDeviceToken import com.teumteum.data.service.UserService import com.teumteum.domain.TeumTeumDataStore import com.teumteum.domain.entity.Message +import com.teumteum.domain.repository.UserRepository import com.teumteum.teumteum.R import com.teumteum.teumteum.presentation.splash.SplashActivity import dagger.hilt.android.AndroidEntryPoint @@ -29,6 +30,9 @@ class TeumMessagingService : FirebaseMessagingService() { @Inject lateinit var userService: UserService + @Inject + lateinit var userRepository: UserRepository + override fun onNewToken(token: String) { super.onNewToken(token) @@ -63,9 +67,12 @@ class TeumMessagingService : FirebaseMessagingService() { } if (alertMessage.type == END_MEETING) { alertMessage.meetingId = message.data["meetingId"]?.toLong() - alertMessage.participants = message.data["participants"]?.toList()?.map { it.digitToInt() } + alertMessage.participants = message.data["participants"]?.split(",")?.map { it.toInt() } + val userId = userRepository.getUserInfo()?.id?.toInt() + if (alertMessage.participants?.contains(userId) == true) + sendNotificationAlarm(alertMessage) } - if (alertMessage.title.isNotEmpty()) sendNotificationAlarm(alertMessage) + else if (alertMessage.title.isNotEmpty()) sendNotificationAlarm(alertMessage) } } } From 05aa4cd774213d1c25e438df48b1f4dd29868753 Mon Sep 17 00:00:00 2001 From: blueme0 Date: Thu, 15 Feb 2024 23:50:19 +0900 Subject: [PATCH 21/31] =?UTF-8?q?[fix/#160]=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EB=B0=B1=EA=B7=B8=EB=9D=BC=EC=9A=B4=EB=93=9C=20/=20=ED=8F=AC?= =?UTF-8?q?=EA=B7=B8=EB=9D=BC=EC=9A=B4=EB=93=9C=20=EC=8B=A4=ED=96=89=20?= =?UTF-8?q?=EA=B5=AC=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/teumteum/teumteum/MyApp.kt | 15 +++++++++++++-- .../presentation/splash/SplashActivity.kt | 2 ++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/MyApp.kt b/app/src/main/java/com/teumteum/teumteum/MyApp.kt index d752b143..9f2f9e16 100644 --- a/app/src/main/java/com/teumteum/teumteum/MyApp.kt +++ b/app/src/main/java/com/teumteum/teumteum/MyApp.kt @@ -2,12 +2,15 @@ package com.teumteum.teumteum import android.app.Application import android.content.Context -import androidx.appcompat.app.AppCompatDelegate +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleObserver +import androidx.lifecycle.OnLifecycleEvent +import androidx.lifecycle.ProcessLifecycleOwner import dagger.hilt.android.HiltAndroidApp import timber.log.Timber @HiltAndroidApp -class MyApp : Application() { +class MyApp : Application(), LifecycleObserver { override fun onCreate() { super.onCreate() @@ -18,9 +21,17 @@ class MyApp : Application() { } setUpFlipper() appContext = applicationContext + ProcessLifecycleOwner.get().lifecycle.addObserver(this) } + @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) + fun onAppBackgrounded() { isForeground = false } + + @OnLifecycleEvent(Lifecycle.Event.ON_RESUME) + fun onAppForegrounded() { isForeground = true} + companion object { lateinit var appContext: Context + var isForeground = false } } diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/splash/SplashActivity.kt b/app/src/main/java/com/teumteum/teumteum/presentation/splash/SplashActivity.kt index a21263b4..79b234e7 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/splash/SplashActivity.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/splash/SplashActivity.kt @@ -11,6 +11,7 @@ import androidx.lifecycle.lifecycleScope import com.teumteum.base.BindingActivity import com.teumteum.base.util.extension.defaultSnackBar import com.teumteum.domain.entity.Message +import com.teumteum.teumteum.MyApp.Companion.isForeground import com.teumteum.teumteum.R import com.teumteum.teumteum.databinding.ActivitySplashBinding import com.teumteum.teumteum.presentation.MainActivity @@ -32,6 +33,7 @@ class SplashActivity isFromAlarm = intent.getBooleanExtra(IS_FROM_ALARM, false) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) getMessage() + if (isForeground) startHomeScreen() checkNetwork() } From 4a247b494f9b81ff3e1bfb508a4ec092d657a52c Mon Sep 17 00:00:00 2001 From: blueme0 Date: Fri, 16 Feb 2024 00:50:00 +0900 Subject: [PATCH 22/31] =?UTF-8?q?[fix/#160]=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=EC=9D=B4=EB=A6=84=20=EC=9E=85=EB=A0=A5=20=EC=BA=A1?= =?UTF-8?q?=EC=85=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teumteum/presentation/signup/name/GetNameFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/signup/name/GetNameFragment.kt b/app/src/main/java/com/teumteum/teumteum/presentation/signup/name/GetNameFragment.kt index 5fb7c245..c69f08be 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/signup/name/GetNameFragment.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/signup/name/GetNameFragment.kt @@ -62,7 +62,8 @@ class GetNameFragment } else { (activity as SignUpActivity).disableNextButton() - binding.tvCaption.visibility = View.VISIBLE + if (userName.isNotBlank()) binding.tvCaption.visibility = View.VISIBLE + else binding.tvCaption.visibility = View.INVISIBLE } } } From 62544bd32c291127e3ae08267667f4b5c33c4fec Mon Sep 17 00:00:00 2001 From: blueme0 Date: Fri, 16 Feb 2024 00:56:34 +0900 Subject: [PATCH 23/31] =?UTF-8?q?[fix/#160]=20=EC=B9=B4=EB=93=9C=20?= =?UTF-8?q?=ED=9B=84=EB=A9=B4=20GOAL=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=83=89=EC=83=81=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../signup/complete/CardCompleteFragment.kt | 6 ++++-- .../presentation/signup/fix/CardFixFragment.kt | 8 +++++--- .../com/teumteum/teumteum/util/ResMapper.kt | 17 +++++++++++++++++ .../teumteum/util/custom/view/BackCardView.kt | 6 +++++- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/signup/complete/CardCompleteFragment.kt b/app/src/main/java/com/teumteum/teumteum/presentation/signup/complete/CardCompleteFragment.kt index 9d853b57..3e1d0451 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/signup/complete/CardCompleteFragment.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/signup/complete/CardCompleteFragment.kt @@ -16,6 +16,7 @@ import com.teumteum.teumteum.util.SignupUtils.CHARACTER_CARD_LIST_BACK import com.teumteum.teumteum.util.SignupUtils.STATUS_STUDENT import com.teumteum.teumteum.util.SignupUtils.STATUS_TRAINEE import com.teumteum.teumteum.util.SignupUtils.STATUS_WORKER +import com.teumteum.teumteum.util.custom.view.model.BackCard import com.teumteum.teumteum.util.custom.view.model.FrontCard import com.teumteum.teumteum.util.custom.view.model.Interest import dagger.hilt.android.AndroidEntryPoint @@ -60,9 +61,10 @@ class CardCompleteFragment for (i in interestSelf.value) { interests.add(Interest(i)) } + + val bc = BackCard(goalContent = goalText.value, characterResId = CHARACTER_CARD_LIST_BACK[characterId.value]) + binding.cardviewBack.getInstance(bc) binding.cardviewBack.apply { - tvGoalContent.text = goalText.value - CHARACTER_CARD_LIST_BACK[characterId.value]?.let { ivCharacter.setImageResource(it) } submitInterestList(interests) isModify = false setIsModifyDetail(false) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/signup/fix/CardFixFragment.kt b/app/src/main/java/com/teumteum/teumteum/presentation/signup/fix/CardFixFragment.kt index 404b615a..4a63108b 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/signup/fix/CardFixFragment.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/signup/fix/CardFixFragment.kt @@ -73,11 +73,13 @@ class CardFixFragment for (i in interestSelf.value) { interests.add(Interest(i)) } + + val bc = BackCard(goalContent = goalText.value, characterResId = SignupUtils.CHARACTER_CARD_LIST_BACK[characterId.value]) + binding.cardviewBack.getInstance(bc) binding.cardviewBack.apply { - setIsModifyDetail(true) - tvGoalContent.text = goalText.value - SignupUtils.CHARACTER_CARD_LIST_BACK[characterId.value]?.let { ivCharacter.setImageResource(it) } submitInterestList(interests) + isModify = false + setIsModifyDetail(true) } } } diff --git a/app/src/main/java/com/teumteum/teumteum/util/ResMapper.kt b/app/src/main/java/com/teumteum/teumteum/util/ResMapper.kt index 2f6269dc..0e2f2f38 100644 --- a/app/src/main/java/com/teumteum/teumteum/util/ResMapper.kt +++ b/app/src/main/java/com/teumteum/teumteum/util/ResMapper.kt @@ -60,6 +60,23 @@ object ResMapper { } } + fun getColorByBackCardCharacterDrawble(context: Context, characterResId: Int): Int { + return when (characterResId) { + R.drawable.ic_card_back_ghost -> getColorByCharacterId(context, 0) + R.drawable.ic_card_back_star -> getColorByCharacterId(context, 1) + R.drawable.ic_card_back_bear -> getColorByCharacterId(context, 2) + R.drawable.ic_card_back_raccon -> getColorByCharacterId(context, 3) + R.drawable.ic_card_back_cat -> getColorByCharacterId(context, 4) + R.drawable.ic_card_back_rabbit -> getColorByCharacterId(context, 5) + R.drawable.ic_card_back_fox -> getColorByCharacterId(context, 6) + R.drawable.ic_card_back_water -> getColorByCharacterId(context, 7) + R.drawable.ic_card_back_penguin -> getColorByCharacterId(context, 8) + R.drawable.ic_card_back_dog -> getColorByCharacterId(context, 9) + R.drawable.ic_card_back_mouse -> getColorByCharacterId(context, 10) + R.drawable.ic_card_back_panda -> getColorByCharacterId(context, 11) + else -> getColorByCharacterId(context, 0) + } + } fun getColorByCharacterId(context: Context, characterId: Int): Int { return when (characterId) { diff --git a/app/src/main/java/com/teumteum/teumteum/util/custom/view/BackCardView.kt b/app/src/main/java/com/teumteum/teumteum/util/custom/view/BackCardView.kt index 904d2dd9..fe772838 100644 --- a/app/src/main/java/com/teumteum/teumteum/util/custom/view/BackCardView.kt +++ b/app/src/main/java/com/teumteum/teumteum/util/custom/view/BackCardView.kt @@ -19,6 +19,7 @@ import com.google.android.flexbox.FlexWrap import com.google.android.flexbox.FlexboxLayoutManager import com.google.android.flexbox.JustifyContent import com.teumteum.teumteum.R +import com.teumteum.teumteum.util.ResMapper import com.teumteum.teumteum.util.callback.OnCurrentListChangedListener import com.teumteum.teumteum.util.custom.itemdecoration.FlexboxItemDecoration import com.teumteum.teumteum.util.custom.view.adapter.InterestAdapter @@ -163,7 +164,10 @@ class BackCardView : CardView, OnCurrentListChangedListener { private fun setUpViews() { tvGoalTitle.text = backCard.goalTitle tvGoalContent.text = backCard.goalContent - backCard.characterResId?.let { ivCharacter.setImageResource(it) } + backCard.characterResId?.let { + ivCharacter.setImageResource(it) + tvGoalTitle.setTextColor(ResMapper.getColorByBackCardCharacterDrawble(context, it)) + } ivFloat.setImageResource(backCard.floatResId) } From 8f9ea000d61eabb528caa9fac8d151156fd0f8a4 Mon Sep 17 00:00:00 2001 From: blueme0 Date: Fri, 16 Feb 2024 08:47:34 +0900 Subject: [PATCH 24/31] =?UTF-8?q?[fix/#160]=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20response=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teumteum/data/datasource/remote/RemoteGroupDataSource.kt | 4 ++-- .../java/com/teumteum/data/repository/GroupRepositoryImpl.kt | 2 +- .../src/main/java/com/teumteum/data/service/GroupService.kt | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/data/src/main/java/com/teumteum/data/datasource/remote/RemoteGroupDataSource.kt b/core/data/src/main/java/com/teumteum/data/datasource/remote/RemoteGroupDataSource.kt index 62055bb5..35ee5335 100644 --- a/core/data/src/main/java/com/teumteum/data/datasource/remote/RemoteGroupDataSource.kt +++ b/core/data/src/main/java/com/teumteum/data/datasource/remote/RemoteGroupDataSource.kt @@ -3,7 +3,7 @@ package com.teumteum.data.datasource.remote import com.teumteum.data.model.request.RequestReviewFriend import com.teumteum.data.model.response.ResponseGroup import com.teumteum.data.model.response.ResponseMeeting -import com.teumteum.data.model.response.ResponseReviewFriends +import com.teumteum.data.model.response.ResponseReviewFriend import com.teumteum.data.service.GroupService import okhttp3.MultipartBody import okhttp3.RequestBody @@ -85,7 +85,7 @@ class RemoteGroupDataSource @Inject constructor( suspend fun getReviewFriendList( meetingId: Long - ): ResponseReviewFriends { + ): List { return service.getReviewFriendList(meetingId) } diff --git a/core/data/src/main/java/com/teumteum/data/repository/GroupRepositoryImpl.kt b/core/data/src/main/java/com/teumteum/data/repository/GroupRepositoryImpl.kt index bdf6d783..f4bd591e 100644 --- a/core/data/src/main/java/com/teumteum/data/repository/GroupRepositoryImpl.kt +++ b/core/data/src/main/java/com/teumteum/data/repository/GroupRepositoryImpl.kt @@ -98,7 +98,7 @@ class GroupRepositoryImpl @Inject constructor( override suspend fun getReviewFriendList(meetingId: Long): Result> { return runCatching { - dataSource.getReviewFriendList(meetingId).participants.map { it.toReviewFriend() } + dataSource.getReviewFriendList(meetingId).map { it.toReviewFriend() } } } diff --git a/core/data/src/main/java/com/teumteum/data/service/GroupService.kt b/core/data/src/main/java/com/teumteum/data/service/GroupService.kt index a5f91bc5..1a12f892 100644 --- a/core/data/src/main/java/com/teumteum/data/service/GroupService.kt +++ b/core/data/src/main/java/com/teumteum/data/service/GroupService.kt @@ -3,8 +3,7 @@ package com.teumteum.data.service import com.teumteum.data.model.request.RequestReviewFriend import com.teumteum.data.model.response.ResponseGroup import com.teumteum.data.model.response.ResponseMeeting -import com.teumteum.data.model.response.ResponseReviewFriends -import com.teumteum.domain.entity.Meeting +import com.teumteum.data.model.response.ResponseReviewFriend import okhttp3.MultipartBody import okhttp3.RequestBody import retrofit2.Response @@ -85,7 +84,7 @@ interface GroupService { @GET("meetings/{meetingId}/participants") suspend fun getReviewFriendList( @Path("meetingId") meetingId: Long - ): ResponseReviewFriends + ): List @POST("users/reviews") suspend fun postRegisterReview( From dbef3f7bf6b0b3d6eb206d6e06a9031e01cf3a7b Mon Sep 17 00:00:00 2001 From: blueme0 Date: Fri, 16 Feb 2024 08:48:02 +0900 Subject: [PATCH 25/31] =?UTF-8?q?[fix/#160]=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EC=82=AC=EC=9A=A9=EC=9E=90=20=EB=B3=B8?= =?UTF-8?q?=EC=9D=B8=EC=97=90=20=EB=8C=80=ED=95=9C=20=EC=98=88=EC=99=B8=20?= =?UTF-8?q?=EC=BC=80=EC=9D=B4=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teumteum/config/TeumMessagingService.kt | 5 ++++- .../presentation/group/review/ReviewViewModel.kt | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt b/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt index e32ea452..100c3f78 100644 --- a/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt +++ b/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt @@ -67,9 +67,12 @@ class TeumMessagingService : FirebaseMessagingService() { } if (alertMessage.type == END_MEETING) { alertMessage.meetingId = message.data["meetingId"]?.toLong() +// Timber.tag("teum-alerts").d("data: ${message.data}") +// Timber.tag("teum-alerts").d("participants string: ${message.data["participants"]?.split(",").toString()}") +// Timber.tag("teum-alerts").d("participants size: ${message.data["participants"]?.split(",")?.size}") alertMessage.participants = message.data["participants"]?.split(",")?.map { it.toInt() } val userId = userRepository.getUserInfo()?.id?.toInt() - if (alertMessage.participants?.contains(userId) == true) + if (alertMessage.participants?.contains(userId) == true && alertMessage.participants?.size!! > 1) sendNotificationAlarm(alertMessage) } else if (alertMessage.title.isNotEmpty()) sendNotificationAlarm(alertMessage) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt index edd1ca6d..c5f86bd0 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt @@ -4,15 +4,18 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.teumteum.domain.entity.ReviewFriend import com.teumteum.domain.repository.GroupRepository +import com.teumteum.domain.repository.UserRepository import dagger.hilt.android.lifecycle.HiltViewModel import javax.inject.Inject import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch +import timber.log.Timber @HiltViewModel class ReviewViewModel @Inject constructor( - private val repository: GroupRepository + private val repository: GroupRepository, + private val userRepository: UserRepository ) : ViewModel() { private var _selectFriendList = listOf() val selectFriendList get() = _selectFriendList @@ -37,12 +40,19 @@ class ReviewViewModel @Inject constructor( _selectDetailFriendList.add(selectFriendDetail) } + private fun filterReviewFriendList(list: List): List { + val friendList = list.toMutableList() + val myUserId = userRepository.getUserInfo()?.id + friendList.removeAll { it.id == myUserId } + return friendList + } + fun getReviewFriendList() { meetingId?.let { id -> viewModelScope.launch { repository.getReviewFriendList(id) - .onSuccess { - _moimFriendList.value = it + .onSuccess { list -> + _moimFriendList.value = filterReviewFriendList(list) } } } From 05601bf56ae8520f1c3c897215260391e45cc361 Mon Sep 17 00:00:00 2001 From: blueme0 Date: Fri, 16 Feb 2024 08:49:05 +0900 Subject: [PATCH 26/31] =?UTF-8?q?[fix/#160]=20ReviewViewModel=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EB=A6=AC=EB=B7=B0?= =?UTF-8?q?=20=ED=95=9C=20=EB=AA=85=EC=9D=BC=20=EB=95=8C=EB=8F=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/group/review/ReviewFriendDetailFragment.kt | 2 +- .../teumteum/presentation/group/review/ReviewViewModel.kt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewFriendDetailFragment.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewFriendDetailFragment.kt index 5168e37a..1154e1c8 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewFriendDetailFragment.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewFriendDetailFragment.kt @@ -48,8 +48,8 @@ class ReviewFriendDetailFragment : private fun initClick() { val friendDetail = ReviewFriend(id, characterId, name, job) binding.btnReview.setOnSingleClickListener { + viewModel.addSelectDetailFriendList(friendDetail) if (viewModel.currentFriendIndex < viewModel.selectFriendList.size) { - viewModel.addSelectDetailFriendList(friendDetail) (requireActivity() as? ReviewActivity)?.nextFriendDetailFragment() } else { viewModel.postRegisterReview() diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt index c5f86bd0..fc5f4ca2 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt @@ -10,7 +10,6 @@ import javax.inject.Inject import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch -import timber.log.Timber @HiltViewModel class ReviewViewModel @Inject constructor( @@ -21,7 +20,7 @@ class ReviewViewModel @Inject constructor( val selectFriendList get() = _selectFriendList private var _selectDetailFriendList = mutableListOf() - val selectDetailFriendList get() = _selectFriendList + val selectDetailFriendList get() = _selectDetailFriendList var meetingId: Long? = null From b9d5763bcab4f4cb7a3b15012d998af4a5000cc7 Mon Sep 17 00:00:00 2001 From: blueme0 Date: Fri, 16 Feb 2024 09:13:41 +0900 Subject: [PATCH 27/31] =?UTF-8?q?[fix/#160]=20=EC=9E=84=EC=8B=9C=20?= =?UTF-8?q?=EC=A1=B0=EC=B9=98=20:=20=EB=AA=A8=EC=9E=84=20=EC=B0=B8?= =?UTF-8?q?=EC=97=AC=EC=9E=90=203=EB=AA=85=20=EC=9D=B4=EC=83=81=EC=9D=B8?= =?UTF-8?q?=20=EA=B2=BD=EC=9A=B0=EC=97=90=EB=A7=8C=20=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=20=EC=A0=84=EC=86=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/teumteum/teumteum/config/TeumMessagingService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt b/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt index 100c3f78..beb3413c 100644 --- a/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt +++ b/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt @@ -72,7 +72,7 @@ class TeumMessagingService : FirebaseMessagingService() { // Timber.tag("teum-alerts").d("participants size: ${message.data["participants"]?.split(",")?.size}") alertMessage.participants = message.data["participants"]?.split(",")?.map { it.toInt() } val userId = userRepository.getUserInfo()?.id?.toInt() - if (alertMessage.participants?.contains(userId) == true && alertMessage.participants?.size!! > 1) + if (alertMessage.participants?.contains(userId) == true && alertMessage.participants?.size!! > 2) sendNotificationAlarm(alertMessage) } else if (alertMessage.title.isNotEmpty()) sendNotificationAlarm(alertMessage) From 0bbff446ad2990f0042f0aecc6f975f1fdf21366 Mon Sep 17 00:00:00 2001 From: blueme0 Date: Fri, 16 Feb 2024 09:47:14 +0900 Subject: [PATCH 28/31] =?UTF-8?q?[fix/#160]=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20post=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teumteum/data/datasource/remote/RemoteGroupDataSource.kt | 4 ++-- .../com/teumteum/data/model/request/RequestReviewFriend.kt | 5 +++++ .../java/com/teumteum/data/repository/GroupRepositoryImpl.kt | 4 ++-- .../src/main/java/com/teumteum/data/service/GroupService.kt | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/core/data/src/main/java/com/teumteum/data/datasource/remote/RemoteGroupDataSource.kt b/core/data/src/main/java/com/teumteum/data/datasource/remote/RemoteGroupDataSource.kt index 35ee5335..fbd9a954 100644 --- a/core/data/src/main/java/com/teumteum/data/datasource/remote/RemoteGroupDataSource.kt +++ b/core/data/src/main/java/com/teumteum/data/datasource/remote/RemoteGroupDataSource.kt @@ -1,6 +1,6 @@ package com.teumteum.data.datasource.remote -import com.teumteum.data.model.request.RequestReviewFriend +import com.teumteum.data.model.request.RequestReviewFriends import com.teumteum.data.model.response.ResponseGroup import com.teumteum.data.model.response.ResponseMeeting import com.teumteum.data.model.response.ResponseReviewFriend @@ -91,7 +91,7 @@ class RemoteGroupDataSource @Inject constructor( suspend fun postRegisterReview( meetingId: Long, - requestReviewFriends: List + requestReviewFriends: RequestReviewFriends ): Boolean { return service.postRegisterReview(meetingId, requestReviewFriends).isSuccessful } diff --git a/core/data/src/main/java/com/teumteum/data/model/request/RequestReviewFriend.kt b/core/data/src/main/java/com/teumteum/data/model/request/RequestReviewFriend.kt index 3461be89..1f591509 100644 --- a/core/data/src/main/java/com/teumteum/data/model/request/RequestReviewFriend.kt +++ b/core/data/src/main/java/com/teumteum/data/model/request/RequestReviewFriend.kt @@ -3,6 +3,11 @@ package com.teumteum.data.model.request import com.teumteum.domain.entity.ReviewFriend import kotlinx.serialization.Serializable +@Serializable +data class RequestReviewFriends( + val reviews: List +) + @Serializable data class RequestReviewFriend( val id: Long, diff --git a/core/data/src/main/java/com/teumteum/data/repository/GroupRepositoryImpl.kt b/core/data/src/main/java/com/teumteum/data/repository/GroupRepositoryImpl.kt index f4bd591e..cfac34f9 100644 --- a/core/data/src/main/java/com/teumteum/data/repository/GroupRepositoryImpl.kt +++ b/core/data/src/main/java/com/teumteum/data/repository/GroupRepositoryImpl.kt @@ -3,9 +3,9 @@ package com.teumteum.data.repository import android.util.Log import com.google.gson.Gson import com.teumteum.data.datasource.remote.RemoteGroupDataSource +import com.teumteum.data.model.request.RequestReviewFriends import com.teumteum.data.model.request.toBody import com.teumteum.data.model.request.toRequestReviewFriend -import com.teumteum.domain.TeumTeumDataStore import com.teumteum.domain.entity.Meeting import com.teumteum.domain.entity.MoimEntity import com.teumteum.domain.entity.ReviewFriend @@ -107,7 +107,7 @@ class GroupRepositoryImpl @Inject constructor( request: List ): Result { return runCatching { - dataSource.postRegisterReview(meetingId, request.map { it.toRequestReviewFriend() }) + dataSource.postRegisterReview(meetingId, RequestReviewFriends(request.map { it.toRequestReviewFriend() })) } } override suspend fun saveBookmark(meetingId: Long): Result { diff --git a/core/data/src/main/java/com/teumteum/data/service/GroupService.kt b/core/data/src/main/java/com/teumteum/data/service/GroupService.kt index 1a12f892..90d2bccd 100644 --- a/core/data/src/main/java/com/teumteum/data/service/GroupService.kt +++ b/core/data/src/main/java/com/teumteum/data/service/GroupService.kt @@ -1,6 +1,6 @@ package com.teumteum.data.service -import com.teumteum.data.model.request.RequestReviewFriend +import com.teumteum.data.model.request.RequestReviewFriends import com.teumteum.data.model.response.ResponseGroup import com.teumteum.data.model.response.ResponseMeeting import com.teumteum.data.model.response.ResponseReviewFriend @@ -89,6 +89,6 @@ interface GroupService { @POST("users/reviews") suspend fun postRegisterReview( @Query("meetingId") meetingsId: Long, - @Body request: List + @Body request: RequestReviewFriends ):Response } \ No newline at end of file From 31ad86c10d4ecc4c7372440c9d9d1573216f7a92 Mon Sep 17 00:00:00 2001 From: blueme0 Date: Fri, 16 Feb 2024 09:47:53 +0900 Subject: [PATCH 29/31] =?UTF-8?q?[fix/#160]=20=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1=20=EC=8B=9C=20=EC=9C=A0=EC=A0=80=20id=20?= =?UTF-8?q?=EC=A4=91=EB=B3=B5=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teumteum/presentation/group/review/ReviewViewModel.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt index fc5f4ca2..0009dd5e 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/review/ReviewViewModel.kt @@ -36,6 +36,7 @@ class ReviewViewModel @Inject constructor( } fun addSelectDetailFriendList(selectFriendDetail: ReviewFriend) { + _selectDetailFriendList.removeAll { it.id == selectFriendDetail.id } _selectDetailFriendList.add(selectFriendDetail) } From 1ef82be40ebf21ddf17722fc2707210c3cab20b0 Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Fri, 16 Feb 2024 11:15:24 +0900 Subject: [PATCH 30/31] [setting] GithubAction CD Cancel --- .github/workflows/debug_builder.yml | 168 ++++++++++++++-------------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/.github/workflows/debug_builder.yml b/.github/workflows/debug_builder.yml index f95d5b05..9ad95f36 100644 --- a/.github/workflows/debug_builder.yml +++ b/.github/workflows/debug_builder.yml @@ -1,84 +1,84 @@ -name: TeumTeum Push Builder - -on: - push: - branches: [ main ] - -defaults: - run: - shell: bash - working-directory: . - -jobs: - build: - name: APK Builder When Push - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Gradle cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: set up JDK 17 - uses: actions/setup-java@v1 - with: - java-version: 17 - - - name: Change gradlew permissions - run: chmod +x ./gradlew - - - name: Create Local Properties - run: touch local.properties - - - name: Access Local Properties - env: - base_url: ${{ secrets.BASE_URL }} - image_url: ${{ secrets.IMAGE_URL }} - kakao_redirect_url: ${{ secrets.KAKAO_REDIRECT_URL }} - naver_redirect_url: ${{ secrets.KAKAO_REDIRECT_URL }} - kakao_api_key: ${{ secrets.KAKAO_API_KEY }} - naver_api_key: ${{ secrets.NAVER_API_KEY }} - run: | - echo base.url=\"$base_url\" >> local.properties - echo image.url=\"$image_url\" >> local.properties - echo kakao.redirect=\"$kakao_redirect_url\" >> local.properties - echo naver.redirect=\"$naver_redirect_url\" >> local.properties - echo kakao.key=\"$kakao_api_key\" >> local.properties - echo naver.key=\"$naver_api_key\" >> local.properties - - - name: Access Firebase Service - run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json - - - name: Build debug APK - run: ./gradlew assembleDebug --stacktrace - - - name: On Success - if: ${{ success() }} - uses: MeilCli/slack-upload-file@v1 - with: - slack_token: ${{ secrets.SLACK_BOT_TOKEN}} - channels: ${{ secrets.SLACK_CHANNEL_ID}} - file_path: 'app/build/outputs/apk/debug/app-debug.apk' - file_name: 'TeumTeum.apk' - file_type: 'apk' - initial_comment: '🎉 TeumTeum이 슬랙으로 들어왔습니다.' - - - name: On Failed, Notify in Slack - if: ${{ failure() }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_COLOR: '#ff0000' - SLACK_ICON: https://play-lh.googleusercontent.com/jUeDnP2wd29y48wolu5a8j08PX3Zt-wsftTVuSR8gYgHI00sq7Zsq2jWx1icTdsISw=w240-h480-rw - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' - MSG_MINIMAL: true - SLACK_USERNAME: TEUMTEUM_ANDROID - SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' - \ No newline at end of file +#name: TeumTeum Push Builder +# +#on: +# push: +# branches: [ main ] +# +#defaults: +# run: +# shell: bash +# working-directory: . +# +#jobs: +# build: +# name: APK Builder When Push +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v2 +# +# - name: Gradle cache +# uses: actions/cache@v2 +# with: +# path: | +# ~/.gradle/caches +# ~/.gradle/wrapper +# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} +# restore-keys: | +# ${{ runner.os }}-gradle- +# - name: set up JDK 17 +# uses: actions/setup-java@v1 +# with: +# java-version: 17 +# +# - name: Change gradlew permissions +# run: chmod +x ./gradlew +# +# - name: Create Local Properties +# run: touch local.properties +# +# - name: Access Local Properties +# env: +# base_url: ${{ secrets.BASE_URL }} +# image_url: ${{ secrets.IMAGE_URL }} +# kakao_redirect_url: ${{ secrets.KAKAO_REDIRECT_URL }} +# naver_redirect_url: ${{ secrets.KAKAO_REDIRECT_URL }} +# kakao_api_key: ${{ secrets.KAKAO_API_KEY }} +# naver_api_key: ${{ secrets.NAVER_API_KEY }} +# run: | +# echo base.url=\"$base_url\" >> local.properties +# echo image.url=\"$image_url\" >> local.properties +# echo kakao.redirect=\"$kakao_redirect_url\" >> local.properties +# echo naver.redirect=\"$naver_redirect_url\" >> local.properties +# echo kakao.key=\"$kakao_api_key\" >> local.properties +# echo naver.key=\"$naver_api_key\" >> local.properties +# +# - name: Access Firebase Service +# run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json +# +# - name: Build debug APK +# run: ./gradlew assembleDebug --stacktrace +# +# - name: On Success +# if: ${{ success() }} +# uses: MeilCli/slack-upload-file@v1 +# with: +# slack_token: ${{ secrets.SLACK_BOT_TOKEN}} +# channels: ${{ secrets.SLACK_CHANNEL_ID}} +# file_path: 'app/build/outputs/apk/debug/app-debug.apk' +# file_name: 'TeumTeum.apk' +# file_type: 'apk' +# initial_comment: '🎉 TeumTeum이 슬랙으로 들어왔습니다.' +# +# - name: On Failed, Notify in Slack +# if: ${{ failure() }} +# uses: rtCamp/action-slack-notify@v2 +# env: +# SLACK_COLOR: '#ff0000' +# SLACK_ICON: https://play-lh.googleusercontent.com/jUeDnP2wd29y48wolu5a8j08PX3Zt-wsftTVuSR8gYgHI00sq7Zsq2jWx1icTdsISw=w240-h480-rw +# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} +# SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌' +# MSG_MINIMAL: true +# SLACK_USERNAME: TEUMTEUM_ANDROID +# SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요' +# \ No newline at end of file From 424c805e52fec40fe58e279fb27cc113ab67743b Mon Sep 17 00:00:00 2001 From: Leekangmin Date: Fri, 16 Feb 2024 14:13:12 +0900 Subject: [PATCH 31/31] =?UTF-8?q?[fix/#166]=20=ED=91=B8=EC=8B=9C=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EB=8F=99=EC=9E=91=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teumteum/config/TeumMessagingService.kt | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt b/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt index beb3413c..6e34bc4a 100644 --- a/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt +++ b/app/src/main/java/com/teumteum/teumteum/config/TeumMessagingService.kt @@ -54,28 +54,25 @@ class TeumMessagingService : FirebaseMessagingService() { } } - override fun onMessageReceived(message: RemoteMessage) { - super.onMessageReceived(message) + override fun handleIntent(intent: Intent?) { + super.handleIntent(intent) if (dataStore.onNotification) { if (dataStore.isLogin) { - val alertMessage = Message("", "", "") - if (message.data.isNotEmpty()) { - alertMessage.title = message.notification?.title.toString() - alertMessage.body = message.notification?.body.toString() - alertMessage.type = message.data["type"].toString() + intent?.let { + val alertMessage = Message("", "", "") + alertMessage.title = intent.getStringExtra("title").toString() + alertMessage.body = intent.getStringExtra("body").toString() + alertMessage.type = intent.getStringExtra("type").toString() + if (alertMessage.type == END_MEETING) { + alertMessage.meetingId = intent.getStringExtra("meetingId")?.toLong() + alertMessage.participants = + intent.getStringExtra("participants")?.split(",")?.map { it.toInt() } + val userId = userRepository.getUserInfo()?.id?.toInt() + if (alertMessage.participants?.contains(userId) == true && alertMessage.participants?.size!! > 2) + sendNotificationAlarm(alertMessage) + } else if (alertMessage.title.isNotEmpty()) sendNotificationAlarm(alertMessage) } - if (alertMessage.type == END_MEETING) { - alertMessage.meetingId = message.data["meetingId"]?.toLong() -// Timber.tag("teum-alerts").d("data: ${message.data}") -// Timber.tag("teum-alerts").d("participants string: ${message.data["participants"]?.split(",").toString()}") -// Timber.tag("teum-alerts").d("participants size: ${message.data["participants"]?.split(",")?.size}") - alertMessage.participants = message.data["participants"]?.split(",")?.map { it.toInt() } - val userId = userRepository.getUserInfo()?.id?.toInt() - if (alertMessage.participants?.contains(userId) == true && alertMessage.participants?.size!! > 2) - sendNotificationAlarm(alertMessage) - } - else if (alertMessage.title.isNotEmpty()) sendNotificationAlarm(alertMessage) } } }