Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.9 배포 #243

Merged
merged 62 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ef7109b
[chore] HomeRoute 정리정돈
fbghgus123 Sep 19, 2024
4fe95a2
[chore] HomeRoute에서 postList 삭제
fbghgus123 Sep 21, 2024
18c4cb4
[chore] 무한 스크롤 로직을 DoraInfinityLazyColumn으로 분리
fbghgus123 Sep 22, 2024
8eb447d
[chore] 폴더 변경시 스크롤 되돌리는 로직 분리
fbghgus123 Sep 22, 2024
5c38a20
[chore] 스낵바 이름 변경
fbghgus123 Sep 22, 2024
87fc79f
[feat] splashactivity 추가
ddyeon Sep 22, 2024
3ce98e2
[chore] Post 캐시 데이터 관리를 ViewModel로 부터 분리
fbghgus123 Sep 23, 2024
44b0c17
[fix] 폴더쪽 링크에 키워드 표시 안되는 현상 해결
fbghgus123 Sep 23, 2024
8a761bd
[chore] spotless 적용
fbghgus123 Sep 23, 2024
a9e1731
[feat] 스플래시 로직 수정
ddyeon Sep 23, 2024
9a86af6
Merge branch 'develop' into feature/splash
ddyeon Sep 23, 2024
478b666
[fix] 홈 화면 로딩 lottie 반복 재생 안되던 현상 해결
fbghgus123 Sep 25, 2024
ce1e0b4
[feat] 홈 화면 기본 폴더 존재한 채로 시작하는 걸로 변경
fbghgus123 Sep 25, 2024
5a8e575
[feat] 탑바 actionIcon있는 경우 확장되도록 수정
ddyeon Sep 26, 2024
88ece4d
[feat] 홈화면에서 웹뷰 이동시 연결 로직 수정
ddyeon Sep 26, 2024
60751c0
[feat] 요약하기 홈 화면 연결
devdayeon Sep 27, 2024
9fd6576
[fix] 린트 수정
devdayeon Sep 27, 2024
857d2d4
[fix] 보관함 상세 탭 디자인 수정
devdayeon Sep 27, 2024
dc64ddd
[fix] 린트 수정
devdayeon Sep 27, 2024
d90406b
[fix] 코드 리뷰 반영 및 애니메이션 제거
devdayeon Sep 27, 2024
fd647e3
Merge pull request #232 from mash-up-kr/feature/loading
fbghgus123 Sep 27, 2024
a31ebb2
[chore] HomeSideEffectUI 에서 viewModel 분리
fbghgus123 Sep 27, 2024
7a164d4
[chore] 리뷰 반영
fbghgus123 Sep 27, 2024
325bb1f
[chore] spotless 적용
fbghgus123 Sep 27, 2024
8f54547
Merge pull request #236 from mash-up-kr/refactor/storage
ddyeon Sep 27, 2024
dbba30b
Merge branch 'develop' into feature/summary
ddyeon Sep 27, 2024
59a51a2
[chore] 리뷰 반영
fbghgus123 Sep 28, 2024
285e3c3
[fix] 홈화면 FeedCard에 카테고리 보이지 않는 현상 해결
fbghgus123 Sep 28, 2024
f3cb991
Merge pull request #230 from mash-up-kr/feature/refactoring/home
fbghgus123 Sep 28, 2024
8d54bbe
[feature] AI 폴더 분류 배너 추가
fbghgus123 Sep 27, 2024
cb90b35
[fix] 전체 폴더에서도 AI 분류 배너 나오도록 수정
fbghgus123 Sep 28, 2024
bc70b7a
[feature] 폴더에 AI 분류 아이콘 추가
fbghgus123 Sep 28, 2024
84fd40f
[fix] AI 분류 후 AI 분류 배너 업데이트 안되는 부분 해결
fbghgus123 Sep 28, 2024
4b153ac
[chore] spotless 적용
fbghgus123 Sep 28, 2024
55d10d7
add release drafter
Ahn-seokjoo Sep 28, 2024
2368f9e
Merge branch 'develop' into feature/auto-release-note
Ahn-seokjoo Sep 28, 2024
e30b06c
[feature] auto release note 추가
Ahn-seokjoo Sep 28, 2024
4cd0897
[feature] test용으로 잠시 막아둠
Ahn-seokjoo Sep 28, 2024
d5f4f16
위치 수정
Ahn-seokjoo Sep 28, 2024
678559e
Merge branch 'develop' into feature/auto-release-note
Ahn-seokjoo Sep 28, 2024
7710563
[feature] 브랜치 수정
Ahn-seokjoo Sep 28, 2024
2d86bba
master setting 추가
Ahn-seokjoo Sep 28, 2024
f2824cb
Merge branch 'develop' into feature/auto-release-note
Ahn-seokjoo Sep 28, 2024
96509f3
Revert "[feature] test용으로 잠시 막아둠"
Ahn-seokjoo Sep 28, 2024
2b7dbbe
[feature] 테스트 제거
Ahn-seokjoo Sep 28, 2024
c257904
[chore] 홈 탭바 아이콘 삭제
fbghgus123 Sep 29, 2024
147ece8
[chore] 홈 탭바 블러 삭제
fbghgus123 Sep 29, 2024
9e89c63
[chore] spotless 적용
fbghgus123 Sep 29, 2024
cc75fa4
Merge pull request #238 from mash-up-kr/feature/ai_recommend
fbghgus123 Sep 30, 2024
38d348e
[chore] 리뷰 반영
fbghgus123 Sep 30, 2024
b44e111
Merge branch 'develop' into chore/home_tap
fbghgus123 Sep 30, 2024
611cb50
Merge pull request #241 from mash-up-kr/chore/home_tap
fbghgus123 Sep 30, 2024
8c7f7fe
[feature] Posts 가져올 때 저장 및 Home 화면 OnCreate시 캐싱된 데이터 로드
fbghgus123 Oct 1, 2024
b5de3df
Merge pull request #240 from mash-up-kr/feature/auto-release-note
Ahn-seokjoo Oct 1, 2024
63f1b22
[feature] 홈 화면 서버에서 데이터 가져올 때까지 하단 로딩 UI 노출
fbghgus123 Oct 1, 2024
3fa89c8
[feature] Post 등록하고 요약 되면 DB 저장 로직 추가
fbghgus123 Oct 1, 2024
3d911dd
[chore] spotless 반영
fbghgus123 Oct 1, 2024
4c9102a
Merge branch 'develop' into feature/summary
ddyeon Oct 2, 2024
6380fb6
Merge pull request #231 from mash-up-kr/feature/splash
ddyeon Oct 2, 2024
fd034b5
[fix] 린트 적용
devdayeon Oct 2, 2024
5fa1f98
Merge pull request #235 from mash-up-kr/feature/summary
ddyeon Oct 2, 2024
454fdfc
Merge pull request #242 from mash-up-kr/feature/home_cache
fbghgus123 Oct 2, 2024
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
5 changes: 5 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
commitish: master
template: |
## What’s Changed

$CHANGES
17 changes: 17 additions & 0 deletions .github/workflows/auto-release-note.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: auto create release note
on:
push:
branches:
- master
permissions:
contents: read
jobs:
create-release-note:
permissions:
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ dependencies {
implementation(libs.core.ktx)
implementation(libs.kotlin.android)
implementation(libs.kotlin.core)
implementation(libs.androidx.splash)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
tools:targetApi="31">

<activity
android:name=".MainActivity"
android:name=".splash.SplashActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand Down
22 changes: 3 additions & 19 deletions app/src/main/java/com/mashup/dorabangs/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,14 @@ import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.compose.runtime.collectAsState
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import com.mashup.dorabangs.core.designsystem.theme.DorabangsTheme
import com.mashup.dorabangs.navigation.DoraApp
import com.mashup.dorabangs.splash.FirstEntryScreen
import com.mashup.dorabangs.splash.SplashViewModel
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class MainActivity : ComponentActivity() {

private val splashViewModel: SplashViewModel by viewModels()
private val overlayPermissionLauncher =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
if (!Settings.canDrawOverlays(this)) {
Expand All @@ -36,26 +31,15 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState)
checkPermission()

val userId = Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID)
splashViewModel.checkUserToken(userId)

val url = intent.data?.path?.substring(1).orEmpty()

installSplashScreen().apply {
setKeepOnScreenCondition {
(splashViewModel.isSplashShow.value || splashViewModel.firstEntryScreen.value == FirstEntryScreen.Splash) &&
url.isBlank()
}
}
val firstEntryScreen = intent.getStringExtra("firstEntry") ?: FirstEntryScreen.Onboarding.name

setContent {
val firstEntryScreen = splashViewModel.firstEntryScreen.collectAsState()
if (firstEntryScreen.value != FirstEntryScreen.Splash) {
if (firstEntryScreen != FirstEntryScreen.Splash.name) {
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager

DorabangsTheme {
DoraApp(
isFirstEntry = firstEntryScreen.value == FirstEntryScreen.Onboarding,
isFirstEntry = firstEntryScreen == FirstEntryScreen.Onboarding.name,
hideKeyboardAction = {
currentFocus?.let {
imm?.hideSoftInputFromWindow(it.windowToken, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import com.dorabangs.feature.navigation.navigateToSaveLinkSelectFolder
import com.dorabangs.feature.navigation.saveLinkNavigation
import com.dorabangs.feature.navigation.saveLinkSelectFolder
import com.mashup.core.navigation.NavigationRoute
import com.mashup.dorabangs.core.model.AISummaryUiModel
import com.mashup.dorabangs.core.summary.aiSummaryNavigation
import com.mashup.dorabangs.core.summary.navigateToAISummary
import com.mashup.dorabangs.core.webview.navigateToWebView
import com.mashup.dorabangs.core.webview.webViewNavigation
import com.mashup.dorabangs.feature.folders.model.FolderManageType
Expand Down Expand Up @@ -63,7 +66,14 @@ fun MainNavHost(
},
navigateToCreateFolder = { appState.navController.navigateToHomeCrateFolder() },
navigateToHomeTutorial = { appState.navController.navigateToHomeTutorial() },
navigateToWebView = { url -> appState.navController.navigateToWebView(url = url) },
navigateToWebView = { cardInfo ->
val summaryUiModel = AISummaryUiModel(
description = cardInfo.content,
url = cardInfo.url,
keywords = cardInfo.keywordList,
)
appState.navController.navigateToWebView(summaryUiModel = summaryUiModel)
},
navigateToUnreadStorageDetail = { folder -> appState.navController.navigateToUnreadStorageDetail(folder) },
)
homeCreateFolderNavigation(
Expand Down Expand Up @@ -163,10 +173,24 @@ fun MainNavHost(
)
appState.navController.popBackStackWithClearFocus()
},
navigateToWebView = { url -> appState.navController.navigateToWebView(url = url) },
navigateToWebView = { cardInfo ->
val summaryUiModel = AISummaryUiModel(
description = cardInfo.content,
url = cardInfo.url,
keywords = cardInfo.keywordList,
)
appState.navController.navigateToWebView(summaryUiModel = summaryUiModel)
},
)
classificationNavigation(
navigateToWebView = { url -> appState.navController.navigateToWebView(url = url) },
navigateToWebView = { cardInfo ->
val summaryUiModel = AISummaryUiModel(
description = cardInfo.content,
url = cardInfo.url,
keywords = cardInfo.keywordList,
)
appState.navController.navigateToWebView(summaryUiModel = summaryUiModel)
},
onClickBackIcon = { appState.navController.popBackStackWithClearFocus() },
navigateToHome = { appState.navController.popBackStackWithClearFocus() },
)
Expand All @@ -193,6 +217,11 @@ fun MainNavHost(
)
webViewNavigation(
navigateToPopBackStack = { appState.navController.popBackStackWithClearFocus() },
navigateToAISummary = { summary -> appState.navController.navigateToAISummary(summaryUiModel = summary) },
)

aiSummaryNavigation(
navigateToPopBackStack = { appState.navController.popBackStackWithClearFocus() },
)
}
}
38 changes: 38 additions & 0 deletions app/src/main/java/com/mashup/dorabangs/splash/SplashActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.mashup.dorabangs.splash

import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import android.provider.Settings
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.compose.runtime.collectAsState
import com.mashup.dorabangs.MainActivity
import dagger.hilt.android.AndroidEntryPoint

@SuppressLint("CustomSplashScreen")
@AndroidEntryPoint
class SplashActivity : ComponentActivity() {
private val splashViewModel: SplashViewModel by viewModels()

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

val userId = Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID)
splashViewModel.checkUserToken(userId)

setContent {
SplashScreen()

val firstEntryScreen = splashViewModel.firstEntryScreen.collectAsState()
if (firstEntryScreen.value != FirstEntryScreen.Splash) {
val intent = Intent(this, MainActivity::class.java)
intent.putExtra("firstEntry", firstEntryScreen.value.name)
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
startActivity(intent)
finish()
}
}
}
}
21 changes: 21 additions & 0 deletions app/src/main/java/com/mashup/dorabangs/splash/SplashScreen.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.mashup.dorabangs.splash

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.mashup.dorabangs.core.designsystem.component.util.LottieLoader
import com.mashup.dorabangs.core.designsystem.R as coreR

@Composable
fun SplashScreen() {
Box(modifier = Modifier.fillMaxSize()) {
LottieLoader(
lottieRes = coreR.raw.splash,
modifier = Modifier.align(Alignment.Center).size(126.dp),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import com.mashup.dorabangs.domain.usecase.user.GetUserAccessTokenUseCase
import com.mashup.dorabangs.domain.usecase.user.RegisterUserUseCase
import com.mashup.dorabangs.domain.usecase.user.SetUserAccessTokenUseCase
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.withTimeout
import javax.inject.Inject

@HiltViewModel
Expand All @@ -40,19 +40,18 @@ class SplashViewModel @Inject constructor(
token
}.orEmpty()

withTimeout(SPLASH_SCREEN_TIME) {
if (userAccessToken.isNotEmpty()) {
splashShowFlow.value = false
_firstEntryScreen.value = if (getIsFirstEntryUseCase().firstOrNull() != false) FirstEntryScreen.Onboarding else FirstEntryScreen.Home
} else {
// Todo :: 유저 토큰 가져오기 실패에 대한 처리 해줘야함 (Like 토스트 메시지)
}
if (userAccessToken.isNotEmpty()) {
delay(SPLASH_SCREEN_TIME)
splashShowFlow.value = false
_firstEntryScreen.value = if (getIsFirstEntryUseCase().firstOrNull() != false) FirstEntryScreen.Onboarding else FirstEntryScreen.Home
} else {
// Todo :: 유저 토큰 가져오기 실패에 대한 처리 해줘야함 (Like 토스트 메시지)
}
}
}

companion object {
private const val SPLASH_SCREEN_TIME = 1000L
private const val SPLASH_SCREEN_TIME = 3000L
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ object DoraBottomSheet : BottomSheetType {
override fun MovingFolderBottomSheet(
modifier: Modifier,
isShowSheet: Boolean,
btnEnable: Boolean,
isBtnEnabled: Boolean,
folderList: List<SelectableBottomSheetItemUIModel>,
onDismissRequest: () -> Unit,
onClickCreateFolder: () -> Unit,
Expand Down Expand Up @@ -145,7 +145,7 @@ object DoraBottomSheet : BottomSheetType {
modifier = Modifier
.fillMaxWidth(),
buttonText = stringResource(id = R.string.moving_folder_bottom_sheet_complete),
enabled = btnEnable,
enabled = isBtnEnabled,
onClickButton = onClickCompleteButton,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.time.temporal.ChronoUnit
import java.util.UUID
import com.mashup.dorabangs.core.designsystem.R as CR

sealed interface FeedUiModel {
val uuid: String
Expand Down Expand Up @@ -60,8 +61,22 @@ sealed interface FeedUiModel {
val title: String = "",
val postCount: Int = 0,
val folderId: String = "",
@DrawableRes val icon: Int? = com.mashup.dorabangs.core.designsystem.R.drawable.ic_3d_all_small,
val isAIGenerated: Boolean = false,
@DrawableRes val icon: Int? = CR.drawable.ic_3d_all_small,
) : FeedUiModel {
override val uuid: String = UUID.randomUUID().toString()

companion object {
fun getDefaultModelList() = listOf(
DoraChipUiModel(
title = "전체",
icon = CR.drawable.ic_3d_all_small,
),
DoraChipUiModel(
title = "즐겨찾기",
icon = CR.drawable.ic_3d_bookmark_small,
),
)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.mashup.dorabangs.core.designsystem.component.topbar

import androidx.annotation.DrawableRes
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
Expand All @@ -27,10 +27,9 @@ fun DoraTopAppBar(
title: String,
isTitleCenter: Boolean = false,
isEnableBackNavigation: Boolean = false,
@DrawableRes actionIcon: Int? = null,
actionIcon: @Composable BoxScope.() -> Unit = {},
isShowBottomDivider: Boolean = false,
onClickBackIcon: () -> Unit = {},
onClickActonIcon: () -> Unit = {},
) {
val isHomeAppBar = isTitleCenter && !isEnableBackNavigation
Box(
Expand Down Expand Up @@ -81,16 +80,8 @@ fun DoraTopAppBar(
)
}
}
actionIcon?.let { icon ->
Icon(
modifier = Modifier
.align(Alignment.CenterEnd)
.padding(end = 20.dp)
.clickable { onClickActonIcon() },
painter = painterResource(id = icon),
contentDescription = "action",
)
}
actionIcon()

if (isShowBottomDivider) {
DoraDivider(modifier = Modifier.align(Alignment.BottomCenter))
}
Expand Down Expand Up @@ -124,9 +115,16 @@ fun PreviewBackWithActionIconTopBar() {
DoraTopBar.BackWithActionIconTopBar(
modifier = Modifier.fillMaxWidth(),
title = "Dorabangs",
actionIcon = R.drawable.ic_plus,
actionIcon = {
Icon(
modifier = Modifier
.align(Alignment.CenterEnd)
.padding(end = 20.dp),
painter = painterResource(id = R.drawable.ic_more_gray),
contentDescription = "action",
)
},
onClickBackIcon = {},
onClickActonIcon = {},
isTitleCenter = true,
isShowBottomDivider = true,
)
Expand Down
Loading
Loading