-
Notifications
You must be signed in to change notification settings - Fork 0
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
[TNT-190] 트레이니 연결 요청 팝업 기능 구현 #110
Merged
+322
−70
Merged
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
d493159
[TNT-190] design: TnTCheckToggleDialog 텍스트 클릭 추가
SeonJeongk 8fab3ad
[TNT-190] feat: 트레이니 홈화면 연결 dialog 띄우기 구현
SeonJeongk 2cfbe83
[TNT-190] feat: 3일간 보지 않기 설정한 날짜 dataStore에 저장
SeonJeongk 3e7635a
[TNT-190] fix: rebase 이후 오류 수정
SeonJeongk 17ceef2
[TNT-000] refactor: 회원가입 이름 입력 에러 문구 수정 반영
SeonJeongk 525664b
[TNT-190] refactor: uiResource -> coreR로 수정
SeonJeongk 091f472
[TNT-000] refactor: 회원가입 달력 초기 노출 날짜 수정
SeonJeongk e2a5316
[TNT-000] refactor: viewModel에서 context 사용하지 않도록 개선
SeonJeongk 7eb3704
[TNT-000] refactor: 회원가입 문구 수정
SeonJeongk 140c097
[TNT-190] feat: isConnected 설정 추가 및 datasource 역할에 맞게 이름 변경
SeonJeongk 611d3f1
[TNT-190] feat: isConnected 저장 및 삭제 구현
SeonJeongk 91109c9
[TNT-190] feat: ConnectRepository에 localDatasource 추가
SeonJeongk 31fc284
[TNT-000] fix: 완료 회차 입력 조건 및 회원 기본 프로필 사진 수정
SeonJeongk 5a95597
[TNT-190] refactor: 연결 다이얼로그 뒤로가기 막기
SeonJeongk 4ea6a54
[TNT-190] fix: 연결여부 저장하지 않도록 수정
SeonJeongk 44b6e39
[TNT-190] feat: 트레이니 연결 촉구 Dialog 기능 구현
SeonJeongk 5f471cb
[TNT-000] fix: 에러 이미지 추가
SeonJeongk cd6b6fd
[TNT-190] fix: 네트워크 에러 핸들링
SeonJeongk 93c5c2c
[TNT-190] refactor: 네이밍 수정
SeonJeongk 20efdde
[TNT-190] fix: onEach 삭제 및 네이밍 수정
SeonJeongk 8241263
[TNT-190] refactor: 네이밍 변경
SeonJeongk c7e63ad
[TNT-190] refactor: 시간 상수 선언
SeonJeongk 9b6a12e
[TNT-190] Merge branch 'develop' into feature/TNT-190
SeonJeongk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
data/storage/src/main/java/co/kr/data/storage/source/ConnectLocalDataSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package co.kr.data.storage.source | ||
|
||
import androidx.datastore.core.DataStore | ||
import androidx.datastore.preferences.core.Preferences | ||
import androidx.datastore.preferences.core.edit | ||
import androidx.datastore.preferences.core.stringPreferencesKey | ||
import co.kr.data.storage.di.StorageModule.CONNECT_STORAGE_NAME | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.map | ||
import javax.inject.Inject | ||
import javax.inject.Named | ||
import javax.inject.Singleton | ||
|
||
@Singleton | ||
class ConnectLocalDataSource @Inject constructor( | ||
@Named(CONNECT_STORAGE_NAME) private val connectPreferences: DataStore<Preferences>, | ||
) { | ||
val homeDialogHiddenDate: Flow<String?> = connectPreferences.data.map { preferences -> | ||
preferences[HOME_DIALOG_HIDDEN_DATE] ?: "" | ||
} | ||
|
||
suspend fun updateHomeDialogHiddenDate(startDate: String) { | ||
connectPreferences.edit { preferences -> | ||
preferences[HOME_DIALOG_HIDDEN_DATE] = startDate | ||
} | ||
} | ||
|
||
suspend fun clearHomeDialogHiddenDate() { | ||
connectPreferences.edit { preferences -> | ||
preferences.remove(HOME_DIALOG_HIDDEN_DATE) | ||
} | ||
} | ||
|
||
companion object { | ||
private val HOME_DIALOG_HIDDEN_DATE = stringPreferencesKey("HOME_DIALOG_HIDDEN_DATE") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
변수명이 UI와 의존성을 지니지 않도록
ExplicitDeniedConnectDate
와 같은 방식으로 네이밍하는게 좋을 것 같아요!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8241263
앗 넵 수정했습니다!