Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bd06612
feat: dto ๋ฐ์ดํ„ฐ ํด๋ž˜์Šค ์ถ”๊ฐ€
jeong724 Mar 4, 2025
01405f4
feat: repository ์ž‘์„ฑ
jeong724 Mar 4, 2025
d591b9c
feat: ์–ด์ œ ์ผ๊ธฐ์นด๋“œ ๋ชฉ๋ก ์กฐํšŒ API ํ˜ธ์ถœ ์„ฑ๊ณต
jeong724 Mar 4, 2025
973afac
feat: ์ผ๊ธฐ์นด๋“œ ์กฐํšŒ API ์ ์šฉ
jeong724 Mar 4, 2025
4b4728c
feat: ์ผ๊ธฐ์นด๋“œ ์กฐํšŒ API ํ˜ธ์ถœ
jeong724 Mar 5, 2025
c6b2eaa
feat: ๋ฐ”ํ…€ ์‹œํŠธ ์ผ๊ธฐ์นด๋“œ ์„ค์ •
jeong724 Mar 5, 2025
6e64438
feat: ๋ฐ”ํ…€ ์‹œํŠธ ์ผ๊ธฐ์นด๋“œ emotion์— ๋”ฐ๋ผ ๋ฐฐ๊ฒฝ์ƒ‰ ์„ค์ •
jeong724 Mar 5, 2025
3a4c5f6
feat: ๋ฐ”ํ…€ ์‹œํŠธ ์นด๋“œ ๋ ˆ์ด์•„์›ƒ ์กฐ์ •
jeong724 Mar 5, 2025
3e5fd00
feat: ๋ฐ”ํ…€ ์‹œํŠธ ์นด๋“œ ๋ ˆ์ด์•„์›ƒ ์„ค์ • + ํ•„์š”์—†๋Š” ํŒŒ์ผ remove
jeong724 Mar 6, 2025
e51011e
feat: ๋ฐ”ํ…€ ์‹œํŠธ ์นด๋“œ ๋ ˆ์ด์•„์›ƒ ์„ค์ • + ํ•„์š”์—†๋Š” ํŒŒ์ผ remove
jeong724 Mar 27, 2025
70cf321
Merge branch 'master' of https://github.com/Team-ToYou/ToYou-Android โ€ฆ
jeong724 Apr 3, 2025
6dadf3e
[fix] ์•Œ๋ฆผ UI ์ œ๋ชฉ ๊ธ€์”จ ํฌ๊ธฐ ๋ณ€๊ฒฝ
tristanjung1006 Apr 7, 2025
5aa0f6b
[release] v1.1.0
tristanjung1006 Apr 7, 2025
51e1095
[feature] ๋ฐ”ํ…€์‹œํŠธ ์ž‘์ผ ์นœ๊ตฌ ์ผ๊ธฐ์นด๋“œ ํ‘œ์‹œ
tristanjung1006 Apr 7, 2025
9e94217
Merge pull request #109 from Team-ToYou/feat/#106
tristanjung1006 Apr 7, 2025
b76d17b
Merge pull request #110 from Team-ToYou/fix/#1.1.0
tristanjung1006 Apr 7, 2025
650dc8b
[fix] ์•Œ๋ฆผ UI QA ๋ฐ˜์˜
tristanjung1006 Apr 7, 2025
3e9acdb
[fix] ์•Œ๋ฆผ UI ๊ตฌ๋ถ„์„  QA ๋ฐ˜์˜
tristanjung1006 Apr 7, 2025
80d4cbd
[fix] ์•Œ๋ฆผ UI ๊ตฌ๋ถ„์„  QA ๋ฐ˜์˜
tristanjung1006 Apr 7, 2025
bb99e0a
[setting] signingConfigs ์„ค์ •
tristanjung1006 Apr 7, 2025
1bbd5d6
[setting] test
tristanjung1006 Apr 7, 2025
320fc95
[setting] test
tristanjung1006 Apr 7, 2025
34f136b
Update android_cd.yml
tristanjung1006 Apr 8, 2025
ffc9998
Update android_cd.yml
tristanjung1006 Apr 8, 2025
d2a2dde
Update android_cd.yml
tristanjung1006 Apr 8, 2025
691bc05
Update android_cd.yml
tristanjung1006 Apr 8, 2025
0b29db9
Update android_cd.yml
tristanjung1006 Apr 8, 2025
dcb4b7a
Merge branch 'master' into release/1.1.0
tristanjung1006 Apr 8, 2025
086c080
Update android_cd.yml
tristanjung1006 Apr 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/android_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ jobs:
- name: Debug Local Properties
run: cat local.properties

- name: Extract Version Name
run: echo "##[set-output name=version;]v$(echo '${{ github.event.pull_request.title }}' | grep -oP 'release v\K[0-9]+\.[0-9]+\.[0-9]+')"
id: extract_version

# 8. Release APK Build
- name: Build Release APK
run: ./gradlew assembleRelease --stacktrace
Expand All @@ -86,14 +90,6 @@ jobs:
name: release-apk
path: app/build/outputs/apk/release/app-release.apk

# ๋ฒ„์ „ ์ •๋ณด ์ถ”์ถœ
- name: Get App Version
id: get_version
run: |
version=$(grep -oP 'versionName\s*"\K[^"]+' app/build.gradle)
echo "VERSION=$version" >> $GITHUB_ENV
echo "Extracted version: $version"

# 11. Firebase App Distribution
- name: Upload to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
Expand All @@ -102,7 +98,7 @@ jobs:
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: seungwon
file: app/build/outputs/apk/release/app-release.apk
releaseNotes: "์ƒˆ๋กœ์šด ๋ฒ„์ „ v${{ env.VERSION }} ์ถœ์‹œ"
releaseNotes: "์ƒˆ๋กœ์šด ๋ฒ„์ „ v${{ steps.extract_version.outputs.version }} ์ถœ์‹œ"

# 12. Notify Discord
- name: Notify Discord
Expand All @@ -111,5 +107,5 @@ jobs:
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d "{\"content\": \"๐Ÿš€ ์ƒˆ๋กœ์šด ๋ฒ„์ „ v${{ env.VERSION }}์ด Firebase App Distribution์— ์—…๋กœ๋“œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!\nAPK ๋‹ค์šด๋กœ๋“œ: https://appdistribution.firebase.google.com\"}" \
-d "{\"content\": \"๐Ÿš€ ์ƒˆ๋กœ์šด ๋ฒ„์ „ v${{ steps.extract_version.outputs.version }}์ด Firebase App Distribution์— ์—…๋กœ๋“œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!\nAPK ๋‹ค์šด๋กœ๋“œ: https://appdistribution.firebase.google.com\"}" \
$DISCORD_WEBHOOK_URL
8 changes: 6 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ val nativeAppKey = localProperties.getProperty("kakao_NATIVE_APP_KEY_MANIFEST")?

android {
signingConfigs {
create("release") {
getByName("debug") {
keyAlias = localProperties["SIGNED_KEY_ALIAS"] as String?
keyPassword = localProperties["SIGNED_KEY_PASSWORD"] as String?
storeFile = localProperties["SIGNED_STORE_FILE"]?.let { file(it) }
storePassword = localProperties["SIGNED_STORE_PASSWORD"] as String?
}
}
namespace = "com.toyou.toyouandroid"
Expand All @@ -27,7 +31,7 @@ android {
minSdk = 28
targetSdk = 34
versionCode = 11
versionName = "1.0.10"
versionName = "1.1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down
Binary file removed app/release/app-release.aab
Binary file not shown.
21 changes: 0 additions & 21 deletions app/src/main/java/com/toyou/toyouandroid/data/UserDao.kt

This file was deleted.

28 changes: 0 additions & 28 deletions app/src/main/java/com/toyou/toyouandroid/data/UserDatabase.kt

This file was deleted.

11 changes: 0 additions & 11 deletions app/src/main/java/com/toyou/toyouandroid/data/UserEntity.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.toyou.toyouandroid.data.home.dto.response

import com.google.gson.annotations.SerializedName

data class YesterdayCardResponse(
@SerializedName("cards") val yesterday: List<YesterdayCard>
)

data class YesterdayCard(
@SerializedName("cardId") val cardId: Long,
@SerializedName("cardContent") val cardContent: YesterdayCardContent
)

data class YesterdayCardContent(
@SerializedName("date") val date: String,
@SerializedName("receiver") val receiver: String,
@SerializedName("emotion") val emotion: String,
@SerializedName("exposure") val exposure: Boolean,
@SerializedName("questionList") val questionList: List<YesterdayCardQuestion>
)

data class YesterdayCardQuestion(
@SerializedName("questionId") val id: Long,
@SerializedName("content") val content: String,
@SerializedName("questionType") val type: String,
@SerializedName("questioner") val questioner: String,
@SerializedName("answer") val answer: String,
@SerializedName("answerOption") val options: List<String>?
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.toyou.toyouandroid.data.home.service

import com.toyou.toyouandroid.data.home.dto.response.CardDetail
import com.toyou.toyouandroid.data.home.dto.response.YesterdayCardResponse
import com.toyou.toyouandroid.network.BaseResponse
import retrofit2.http.GET
import retrofit2.http.Header
Expand All @@ -12,4 +13,8 @@ interface HomeService {
suspend fun getCardDetail(
@Path("cardId") card : Long
) : BaseResponse<CardDetail>

@GET("/diarycards/yesterday")
suspend fun getCardYesterday(
) : BaseResponse<YesterdayCardResponse>
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package com.toyou.toyouandroid.domain.home.repository

import com.toyou.toyouandroid.data.home.dto.response.YesterdayCardResponse
import com.toyou.toyouandroid.data.home.service.HomeService
import com.toyou.toyouandroid.network.AuthNetworkModule
import com.toyou.toyouandroid.network.BaseResponse

class HomeRepository {
private val client = AuthNetworkModule.getClient().create(HomeService::class.java)

suspend fun getCardDetail(id : Long)=client.getCardDetail(id)

suspend fun getYesterdayCard() = client.getCardYesterday()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.toyou.toyouandroid.model;

const val Ytype1 = "LONG_ANSWER"
const val Ytype2 = "SHORT_ANSWER"
const val Ytype3 = "OPTIONAL"
const val Ytype4 = 3
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import com.toyou.toyouandroid.data.emotion.dto.EmotionRequest
import com.toyou.toyouandroid.data.onboarding.service.AuthService
import com.toyou.toyouandroid.data.social.service.SocialService
import com.toyou.toyouandroid.domain.create.repository.CreateRepository
import com.toyou.toyouandroid.domain.home.repository.HomeRepository
import com.toyou.toyouandroid.network.AuthNetworkModule
import com.toyou.toyouandroid.network.NetworkModule
import com.toyou.toyouandroid.presentation.fragment.notice.NoticeDialog
Expand Down Expand Up @@ -57,18 +58,19 @@ class HomeOptionFragment : Fragment() {

val createService = AuthNetworkModule.getClient().create(CreateService::class.java)
val createRepository = CreateRepository(createService)
val homeRepository = HomeRepository()

homeOptionViewModel = ViewModelProvider(
this,
HomeViewModelFactory(
tokenManager
tokenManager, homeRepository
)
)[HomeOptionViewModel::class.java]

homeViewModel = ViewModelProvider(
this,
HomeViewModelFactory(
tokenManager
tokenManager, homeRepository
)
)[HomeViewModel::class.java]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ import androidx.recyclerview.widget.GridLayoutManager
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.toyou.toyouHoandroid.data.create.service.CreateService
import com.toyou.toyouandroid.R
import com.toyou.toyouandroid.data.UserDatabase
import com.toyou.toyouandroid.databinding.FragmentHomeBinding
import com.toyou.toyouandroid.network.AuthNetworkModule
import com.toyou.toyouandroid.presentation.base.MainActivity
import com.toyou.toyouandroid.data.emotion.dto.DiaryCard
import com.toyou.toyouandroid.data.home.dto.response.YesterdayCard
import com.toyou.toyouandroid.presentation.fragment.home.adapter.HomeBottomSheetAdapter
import com.toyou.toyouandroid.presentation.fragment.notice.NoticeViewModel
import com.toyou.toyouandroid.domain.notice.NoticeRepository
import com.toyou.toyouandroid.data.notice.service.NoticeService
import com.toyou.toyouandroid.data.onboarding.service.AuthService
import com.toyou.toyouandroid.data.record.service.RecordService
import com.toyou.toyouandroid.domain.create.repository.CreateRepository
import com.toyou.toyouandroid.domain.home.repository.HomeRepository
import com.toyou.toyouandroid.domain.record.RecordRepository
import com.toyou.toyouandroid.network.NetworkModule
import com.toyou.toyouandroid.presentation.viewmodel.NoticeViewModelFactory
Expand All @@ -54,7 +54,6 @@ class HomeFragment : Fragment() {
private lateinit var bottomSheetBehavior: BottomSheetBehavior<ConstraintLayout>

private lateinit var userViewModel: UserViewModel
private lateinit var database: UserDatabase
private lateinit var cardViewModel: CardViewModel

private lateinit var listener: HomeBottomSheetClickListener
Expand All @@ -79,6 +78,7 @@ class HomeFragment : Fragment() {
val recordRepository = RecordRepository(recordService)
val createService = AuthNetworkModule.getClient().create(CreateService::class.java)
val createRepository = CreateRepository(createService)
val homeRepository = HomeRepository()


noticeViewModel = ViewModelProvider(
Expand All @@ -88,7 +88,7 @@ class HomeFragment : Fragment() {

viewModel = ViewModelProvider(
this,
HomeViewModelFactory(tokenManager)
HomeViewModelFactory(tokenManager, homeRepository)
)[HomeViewModel::class.java]

binding.lifecycleOwner = viewLifecycleOwner
Expand Down Expand Up @@ -121,7 +121,6 @@ class HomeFragment : Fragment() {
override fun onDiaryCardClick(cardId: Int?) {
Timber.tag("HomeFragment").d("$cardId")
cardId?.let {
cardInfoViewModel.getCardDetail(cardId.toLong())
val bundle = Bundle().apply {
putInt("cardId", it)
}
Expand All @@ -140,7 +139,10 @@ class HomeFragment : Fragment() {

(requireActivity() as MainActivity).hideBottomNavigation(false)

database = UserDatabase.getDatabase(requireContext())

//์ผ๊ธฐ์นด๋“œ ์กฐํšŒ
viewModel.getYesterdayCard()


// ์งˆ๋ฌธ ๊ฐœ์ˆ˜์— ๋”ฐ๋ฅธ ์šฐ์ฒดํ†ต ์ด๋ฏธ์ง€ ๋ณ€๊ฒฝ
userViewModel.cardNum.observe(viewLifecycleOwner) { cardNum ->
Expand Down Expand Up @@ -175,9 +177,6 @@ class HomeFragment : Fragment() {
binding.homeBottomsheetPseudo.visibility = View.VISIBLE
binding.homeBottomSheetRv.visibility = View.GONE

// ์ž‘์ผ ์นœ๊ตฌ ์ผ๊ธฐ ์นด๋“œ ์ž๋™ ์กฐํšŒ
// viewModel.loadYesterdayDiaryCards()

// ๋ฐ”ํ…€ ์‹œํŠธ ํ„ฐ์น˜ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ
binding.homeBottomSheet.apply {
setOnTouchListener { v, event ->
Expand All @@ -201,9 +200,14 @@ class HomeFragment : Fragment() {
}

// ํ™ˆ ํ™”๋ฉด ๋ฐ”ํ…€ ์‹œํŠธ ์„ค์ •
viewModel.diaryCards.observe(viewLifecycleOwner) { diaryCards ->
if (diaryCards != null) {
setupRecyclerView(diaryCards)
viewModel.yesterdayCards.observe(viewLifecycleOwner) { yesterdayCards ->
if (yesterdayCards.isNotEmpty()) {
binding.homeBottomsheetPseudo.visibility = View.GONE
binding.homeBottomSheetRv.visibility = View.VISIBLE
setupRecyclerView(yesterdayCards)
} else {
binding.homeBottomsheetPseudo.visibility = View.VISIBLE
binding.homeBottomSheetRv.visibility = View.GONE
}
}

Expand Down Expand Up @@ -312,7 +316,7 @@ class HomeFragment : Fragment() {
}
}

private fun setupRecyclerView(items: List<DiaryCard>) {
private fun setupRecyclerView(items: List<YesterdayCard>) {

val adapter = HomeBottomSheetAdapter(items.toMutableList(), listener)
binding.homeBottomSheetRv.layoutManager = GridLayoutManager(context, 2)
Expand Down
Loading
Loading