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

배경화면 커스텀 #101

Open
wants to merge 62 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
75383b5
refactor: AdminMain -> ThemeList 네이밍 리팩토링
tak8997 Dec 1, 2024
7379fe5
feat: 배경화면 커스텀 유도 바텀시트 단순 ui 작업 및 네비게이션 처리
tak8997 Dec 1, 2024
f4b2aed
feat: 백그라운드 커스텀 유도 다이얼로그 ui 및 프레젠테이션 로직 처리
tak8997 Dec 15, 2024
0c113cb
feat: banner ui 개선
tak8997 Dec 15, 2024
0ae1b2a
feat: 테마 리스트 ui 개선
tak8997 Dec 15, 2024
a29535e
feat: 타이머 배경 설정 ui 작업
tak8997 Dec 25, 2024
6569aab
feat: 배경설정 안내 ui 작업
tak8997 Dec 25, 2024
6e91fbf
feat: 구독 결제 유도 바텀시트 다이얼로그 ui 작업
tak8997 Jan 1, 2025
b2a1810
feat: 배경 설정 데이터 전달 및 이미지 처리
tak8997 Jan 5, 2025
a29d6b0
feat: 이미지 없고 배경 활성화 하려고 할때 토스트 처리
tak8997 Jan 5, 2025
763fe0a
Merge branch 'develop' into feature/배경화면_커스텀_1차
tak8997 Jan 11, 2025
da1ab2c
feat: 테마 이미지 설정 토글 api 작업
tak8997 Jan 11, 2025
d9e1c16
feat: 테마 배경 토글 api 연결 및 프레젠테이션 로직 처리
tak8997 Jan 11, 2025
5a93aa9
feat: 배경 커스텀 화면으로 이동 처리
tak8997 Jan 18, 2025
852ec03
feat: 배경화면 커스텀 상세화면 ui 작업
tak8997 Jan 19, 2025
dd41db2
feat: 줌, 드래그를 위한 PhotoView 추가
tak8997 Jan 19, 2025
cc94730
feat: 배경화면 커스텀 정보 db 저장 및 ui를 위한 클래스 추가
tak8997 Jan 25, 2025
61ee136
feat: 배경화면 커스텀 화면으로 네비게이션 처리
tak8997 Jan 25, 2025
526d976
feat: db converter 추가
tak8997 Jan 25, 2025
a4c5e48
feat: db 버전업
tak8997 Jan 25, 2025
0559876
feat: 테마 이미지 정보 필드 수정
tak8997 Jan 25, 2025
483bdeb
feat: ThemEntitiy 필드 추가
tak8997 Jan 25, 2025
0c2f856
feat: 테마 가져올때, 배경 커스텀 정보도 저장할 수 있도록 수정
tak8997 Jan 25, 2025
da289cb
feat: 배경 커스텀 ui, 프레젠테이션 로직 처리
tak8997 Jan 25, 2025
83694c6
feat: 테마 배경 설정 안내 봤는지 여부에 대한 처리
tak8997 Jan 25, 2025
d5cd6fa
revert 클래스 네이밍 수정
tak8997 Jan 25, 2025
cba83c5
Merge branch 'develop' into feature/배경화면_커스텀_1차
tak8997 Jan 25, 2025
83b73a0
feat: 어드민 메인 페이지 테마 이미지 처리
tak8997 Jan 25, 2025
56e2b17
feat: banner api 수정
tak8997 Jan 25, 2025
fe9608d
refactor: 메소드 명 수정
tak8997 Jan 25, 2025
1b6e4fe
feat: 배너 구독여부와 상관없이 보여주도록 수정
tak8997 Jan 25, 2025
6663559
refactor: 하드코딩 수정 및 클래스 필드 수정
tak8997 Jan 25, 2025
8c2518b
feat: 구독 api 연결 및 ui 처리
tak8997 Jan 30, 2025
e5ea868
feat: 월 구독 처리
tak8997 Jan 30, 2025
1c7cc2c
feat: theme 업데이트 전에 theme이 존재하는지 체크하는 dao추가
tak8997 Feb 1, 2025
da4400f
feat: 배경 활성화 api 수정된 것 반영
tak8997 Feb 1, 2025
3d18a28
fix: 배경 설정 안내 ui 버그 수정
tak8997 Feb 2, 2025
5dd9061
fix: 배경화면 커스텀 기능 안내 다이얼로그 앱 진입시 한번 봤으면 다시 안보이도록 수정
tak8997 Feb 2, 2025
e01917a
fix: 이미지 색상 틴트 적용
tak8997 Feb 2, 2025
3e508fc
fix: 테마 리프레시 로직 처리 추가
tak8997 Feb 2, 2025
9f40e28
fix: 테마 배경 이미지 placeholder 수정
tak8997 Feb 2, 2025
2a0231c
fix: 유저 구독 상태에 따른 문구 분기
tak8997 Feb 2, 2025
fa72de6
fix: 테마 배경 이미지 미리보기 ui 적용 및 centerCrop 처리
tak8997 Feb 2, 2025
72b74b7
fix: 백그라운드 이미지 커스텀 투명도 ui 수정
tak8997 Feb 2, 2025
797a2d9
fix: 이미지 커스텀 안내 ui visible 디폴값 수정
tak8997 Feb 2, 2025
c9d9e0e
fix: 배경화면 커스텀 안내 레이아웃 숨김 처리
tak8997 Feb 8, 2025
1a2d99a
fix: 배경화면 수정화면 이미지뷰 scaleType 수정
tak8997 Feb 8, 2025
1053612
feat: 게임 화면에 커스텀 배경화면 적용
tak8997 Feb 8, 2025
123a6d3
fix: 토글 싸이즈 수정
tak8997 Feb 8, 2025
06d05a6
fix: 금액에 ,(콤마) 추가
tak8997 Feb 8, 2025
4474c28
fix: 테마 안내 배경 블러 처리
tak8997 Feb 8, 2025
f9230d0
fix: dismiss -> popbackstack
tak8997 Feb 8, 2025
84bac0b
feat: 이미지 편집중이면 나가기 확인 다이얼로그 띄우기
tak8997 Feb 8, 2025
81ebd1f
fix: 이미지 드래그 할때도 안내 레이아웃 숨김 처리
tak8997 Feb 8, 2025
8a38d16
fix: game 화면에서는 이미지 터치, 드래그, 스케일 편집이 불가능하도록 처리
tak8997 Feb 8, 2025
7c896d5
fix: 배경 이미지 알파 설정
tak8997 Feb 8, 2025
e7f627f
fix: 배너 ui수정
tak8997 Feb 8, 2025
98a7799
fix: OnBackPressedCallback 수정
tak8997 Feb 8, 2025
ab02d71
fix: 커스텀 이미지 투명도 수정
tak8997 Feb 8, 2025
7267fe2
feat: 게임 시작전 배경 이미지 보여주기
tak8997 Feb 9, 2025
bc437d5
fix: rendered 플래그 제거
tak8997 Feb 9, 2025
461ee8d
fix: 테마 배경 이미지 on/off에 따른 Game화면 반영 여부 처리
tak8997 Feb 9, 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
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,19 @@ class SettingDataSource @Inject constructor(

fun saveUserEmail(userEmail: String) = runBlocking {
dataStore.updateData {
it.copy(userEmail= userEmail)
it.copy(userEmail = userEmail)
}
}

fun getUserEmail() = runBlocking {
data.first().userEmail
}

fun setRecommendBackgroundCustomDialogHidden(time: Long) = runBlocking {
dataStore.updateData { it.copy(backgroundCustomDialogHideUntil = time) }
}

fun getRecommendBackgroundCustomDialogHidden() = runBlocking {
data.first().backgroundCustomDialogHideUntil
juhwankim-dev marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ data class AppSettings(
val isInitLaunch: Boolean = true,
val lastLaunchDate: Long = 0L,
val emailSaveChecked: Boolean = false,
val userEmail: String = ""
val userEmail: String = "",
val backgroundCustomDialogHideUntil: Long = 0L
)
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,12 @@ class DataStoreRepositoryImpl @Inject constructor(
}.also { firstInit ->
if (firstInit) settingDataSource.setLastLaunchDate()
}

override fun setRecommendBackgroundCustomDialogHidden(time: Long) {
settingDataSource.setRecommendBackgroundCustomDialogHidden(time)
}

override fun getRecommendBackgroundCustomDialogHidden(): Long {
return settingDataSource.getRecommendBackgroundCustomDialogHidden()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ interface DataStoreRepository {
suspend fun getIsInitLaunch(): Boolean

val isFirstInitOfDay: Boolean

fun setRecommendBackgroundCustomDialogHidden(time: Long)
fun getRecommendBackgroundCustomDialogHidden(): Long
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package com.nextroom.nextroom.presentation.ui.adminmain

import android.app.Dialog
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.nextroom.nextroom.presentation.databinding.FragmentBottomSheetRecommendBackgrounCustomBinding
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -28,6 +32,21 @@ class RecommendBackgroundCustomBottomSheet : BottomSheetDialogFragment() {
return binding.root
}

override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val bottomSheetDialog = BottomSheetDialog(requireContext(), theme)
bottomSheetDialog.setOnShowListener { dialog ->
val bottomSheet =
(dialog as BottomSheetDialog).findViewById<FrameLayout>(com.google.android.material.R.id.design_bottom_sheet)
bottomSheet?.let {
BottomSheetBehavior.from(it).state = BottomSheetBehavior.STATE_EXPANDED
BottomSheetBehavior.from(it).skipCollapsed = true
BottomSheetBehavior.from(it).isHideable = true
}
}

return bottomSheetDialog
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.acbConfirm.setOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package com.nextroom.nextroom.presentation.ui.adminmain

import androidx.lifecycle.ViewModel
import com.nextroom.nextroom.domain.repository.DataStoreRepository
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class RecommendBackgroundCustomViewModel @Inject constructor() : ViewModel() {
class RecommendBackgroundCustomViewModel @Inject constructor(
private val dataStoreRepository: DataStoreRepository
) : ViewModel() {

fun onDismissClicked() {
//TODO : 일주일간 보지 않기
val oneWeekLater = System.currentTimeMillis() + (7 * 24 * 60 * 60 * 1000) // 일주일 밀리세컨드 표시
dataStoreRepository.setRecommendBackgroundCustomDialogHidden(oneWeekLater)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,18 @@ class ThemeListViewModel @Inject constructor(
reduce { state.copy(banner = it.firstOrNull()) }
}

//TODO : test
postSideEffect(ThemeListEvent.RecommendBackgroundCustom)
if (!shouldHideRecommendBackgroundCustomDialog()) {
postSideEffect(ThemeListEvent.RecommendBackgroundCustom)
}
}
reduce { state.copy(loading = false) }
}

private fun shouldHideRecommendBackgroundCustomDialog(): Boolean {
val hideUntil = dataStoreRepository.getRecommendBackgroundCustomDialogHidden()
return System.currentTimeMillis() < hideUntil
}

private fun updateShopInfo(shopName: String) = intent {
reduce { state.copy(shopName = shopName) }
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down Expand Up @@ -64,7 +63,9 @@

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:src="@drawable/bg_background_custom_introduce" />
</androidx.cardview.widget.CardView>

<androidx.appcompat.widget.AppCompatButton
Expand Down Expand Up @@ -96,7 +97,7 @@

<Space
android:layout_width="wrap_content"
android:layout_height="16dp"
android:layout_height="36dp"
app:layout_constraintEnd_toEndOf="@+id/gl_end"
app:layout_constraintStart_toStartOf="@id/gl_start"
app:layout_constraintTop_toBottomOf="@+id/tv_cancel" />
Expand Down
2 changes: 1 addition & 1 deletion presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@
<string name="dialog_message_game_start_confirm">버튼을 클릭하면 타이머가 시작됩니다</string>
<string name="text_no_show_for_a_week">일주일간 보지않기</string>
<string name="text_confirm">확인</string>
<string name="text_background_custom_recommend_title">타이머에 배경 이미지를 등록해보세요.</string>
<string name="text_background_custom_recommend_title">타이머 배경 커스텀 기능 출시 ✨</string>
<string name="text_recommend_background_custom_desc">테마 포스터로 타이머 배경을 커스텀 할 수 있습니다. 각 테마의 독특한 분위기를 더해 몰입감을 높여보세요.</string>
</resources>