-
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
[PC-596] 설정 페이지 웹뷰 및 API 연결 #67
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d94b08e
[PC-596] WebViewScreen 추가
tgyuuAn 37b7dfc
[PC-596] 노션 WebView 문제 해결
tgyuuAn d722d88
[PC-596] SettingInfo Api 추가
tgyuuAn a5b6da8
[PC-596] Setting 화면 실제 데이터로 변경
tgyuuAn fbcde45
[PC-596] 실제 앱 버전 데이터로 변경
tgyuuAn 72dbc03
[PC-596] 토글 권한 업데이트 API 연결
tgyuuAn 880affd
[PC-596] 연락처 동기화 애니메이션 적용
tgyuuAn d8e2fe2
[PC-596] CI/CD에 URL 추가
tgyuuAn 3571ebb
[PC-596] CI/CD에 URL 추가
tgyuuAn 1bfede2
Merge branch 'develop' into feature/tgyuu/PC-596
tgyuuAn 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
7 changes: 7 additions & 0 deletions
7
core/domain/src/main/java/com/puzzle/domain/model/user/UserSetting.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,7 @@ | ||
package com.puzzle.domain.model.user | ||
|
||
data class UserSetting( | ||
val isNotificationEnabled: Boolean, | ||
val isMatchNotificationEnabled: Boolean, | ||
val isAcquaintanceBlockEnabled: Boolean, | ||
) |
5 changes: 5 additions & 0 deletions
5
core/domain/src/main/java/com/puzzle/domain/repository/UserRepository.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 |
---|---|---|
@@ -1,7 +1,12 @@ | ||
package com.puzzle.domain.repository | ||
|
||
import com.puzzle.domain.model.user.UserRole | ||
import com.puzzle.domain.model.user.UserSetting | ||
|
||
interface UserRepository { | ||
suspend fun getUserRole(): Result<UserRole> | ||
suspend fun getUserSettingInfo(): Result<UserSetting> | ||
suspend fun updatePushNotification(toggle: Boolean): Result<Unit> | ||
suspend fun updateMatchNotification(toggle: Boolean): Result<Unit> | ||
suspend fun updateBlockAcquaintances(toggle: Boolean): Result<Unit> | ||
} |
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
17 changes: 17 additions & 0 deletions
17
core/network/src/main/java/com/puzzle/network/model/user/GetSettingInfoResponse.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,17 @@ | ||
package com.puzzle.network.model.user | ||
|
||
import com.puzzle.domain.model.user.UserSetting | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class GetSettingInfoResponse( | ||
val isNotificationEnabled: Boolean?, | ||
val isMatchNotificationEnabled: Boolean?, | ||
val isAcquaintanceBlockEnabled: Boolean?, | ||
) { | ||
fun toDomain() = UserSetting( | ||
isNotificationEnabled = isNotificationEnabled ?: false, | ||
isMatchNotificationEnabled = isMatchNotificationEnabled ?: false, | ||
isAcquaintanceBlockEnabled = isAcquaintanceBlockEnabled ?: false, | ||
) | ||
} |
8 changes: 8 additions & 0 deletions
8
core/network/src/main/java/com/puzzle/network/model/user/UpdateSettingRequest.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,8 @@ | ||
package com.puzzle.network.model.user | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class UpdateSettingRequest( | ||
val toggle: Boolean, | ||
) |
23 changes: 23 additions & 0 deletions
23
core/network/src/main/java/com/puzzle/network/source/user/UserDataSource.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,23 @@ | ||
package com.puzzle.network.source.user | ||
|
||
import com.puzzle.network.api.PieceApi | ||
import com.puzzle.network.model.unwrapData | ||
import com.puzzle.network.model.user.GetSettingInfoResponse | ||
import com.puzzle.network.model.user.UpdateSettingRequest | ||
import javax.inject.Inject | ||
|
||
class UserDataSource @Inject constructor( | ||
private val pieceApi: PieceApi, | ||
) { | ||
suspend fun getSettingsInfo(): Result<GetSettingInfoResponse> = | ||
pieceApi.getSettingInfos().unwrapData() | ||
|
||
suspend fun updatePushNotification(toggle: Boolean): Result<Unit> = | ||
pieceApi.updatePushNotification(UpdateSettingRequest(toggle)).unwrapData() | ||
|
||
suspend fun updateMatchNotification(toggle: Boolean): Result<Unit> = | ||
pieceApi.updateMatchNotification(UpdateSettingRequest(toggle)).unwrapData() | ||
|
||
suspend fun updateBlockAcquaintances(toggle: Boolean): Result<Unit> = | ||
pieceApi.updateBlockAcquaintances(UpdateSettingRequest(toggle)).unwrapData() | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,38 @@ | ||
import java.util.Properties | ||
|
||
plugins { | ||
id("piece.android.feature") | ||
} | ||
|
||
android { | ||
namespace = "com.puzzle.setting" | ||
|
||
defaultConfig { | ||
val localProperties = Properties() | ||
localProperties.load(project.rootProject.file("local.properties").bufferedReader()) | ||
buildConfigField( | ||
type = "String", | ||
name = "PIECE_CHANNEL_TALK_URL", | ||
value = "\"${localProperties["PIECE_CHANNEL_TALK_URL"]}\"" | ||
) | ||
buildConfigField( | ||
type = "String", | ||
name = "PIECE_TERMS_OF_USE_URL", | ||
value = "\"${localProperties["PIECE_TERMS_OF_USE_URL"]}\"" | ||
) | ||
buildConfigField( | ||
type = "String", | ||
name = "PIECE_PRIVACY_AND_POLICY_URL", | ||
value = "\"${localProperties["PIECE_PRIVACY_AND_POLICY_URL"]}\"" | ||
) | ||
buildConfigField( | ||
type = "String", | ||
name = "PIECE_NOTICE_URL", | ||
value = "\"${localProperties["PIECE_NOTICE_URL"]}\"" | ||
) | ||
} | ||
|
||
buildFeatures { | ||
buildConfig = true | ||
} | ||
} |
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.
이 화면에서는 네비게이션 바가 없어져야 해서 추가했습니다!