forked from boostcampwm-2022/android04-BEEP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issues boostcampwm-2022#287 feat: Setting과 연결된 빈 화면을 정의
- Loading branch information
Showing
35 changed files
with
446 additions
and
1 deletion.
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
16 changes: 16 additions & 0 deletions
16
domain/src/main/java/com/lighthouse/domain/usecase/setting/SetNotificationOptionUseCase.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,16 @@ | ||
package com.lighthouse.domain.usecase.setting | ||
|
||
import com.lighthouse.domain.repository.auth.AuthRepository | ||
import com.lighthouse.domain.repository.user.UserRepository | ||
import javax.inject.Inject | ||
|
||
class SetNotificationOptionUseCase @Inject constructor( | ||
private val authRepository: AuthRepository, | ||
private val userRepository: UserRepository | ||
) { | ||
|
||
suspend operator fun invoke(enable: Boolean): Result<Unit> { | ||
val userId = authRepository.getCurrentUserId() | ||
return userRepository.setNotificationEnable(userId, enable) | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
domain/src/main/java/com/lighthouse/domain/usecase/setting/SetSecurityOptionUseCase.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.lighthouse.domain.usecase.setting | ||
|
||
import com.lighthouse.beep.model.user.SecurityOption | ||
import com.lighthouse.domain.repository.auth.AuthRepository | ||
import com.lighthouse.domain.repository.user.UserRepository | ||
import javax.inject.Inject | ||
|
||
class SetSecurityOptionUseCase @Inject constructor( | ||
private val authRepository: AuthRepository, | ||
private val userRepository: UserRepository | ||
) { | ||
|
||
suspend operator fun invoke(options: SecurityOption): Result<Unit> { | ||
val userId = authRepository.getCurrentUserId() | ||
return userRepository.setSecurityOption(userId, options) | ||
} | ||
} |
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 @@ | ||
/build |
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,30 @@ | ||
plugins { | ||
id("beep.android.library") | ||
id("beep.android.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.lighthouse.features.coffee" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.core) | ||
implementation(projects.coreAndroid) | ||
implementation(projects.model) | ||
implementation(projects.domain) | ||
implementation(projects.common) | ||
implementation(projects.commonAndroid) | ||
implementation(projects.uiCommon) | ||
|
||
implementation(libs.androidX.core.ktx) | ||
implementation(libs.androidX.appcompat) | ||
implementation(libs.androidX.constraintlayout) | ||
implementation(libs.androidX.fragment.ktx) | ||
|
||
implementation(libs.androidX.navigation.ui.ktx) | ||
implementation(libs.androidX.navigation.fragment.ktx) | ||
|
||
implementation(libs.material) | ||
|
||
implementation(libs.timber) | ||
} |
8 changes: 8 additions & 0 deletions
8
features/ui-coffee/src/main/java/com/lighthouse/features/coffee/ui/CoffeeFragment.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.lighthouse.features.coffee.ui | ||
|
||
import androidx.fragment.app.Fragment | ||
import com.lighthouse.features.coffee.R | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class CoffeeFragment : Fragment(R.layout.fragment_coffee) |
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
10 changes: 10 additions & 0 deletions
10
features/ui-coffee/src/main/res/navigation/coffee_nav_graph.xml
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<navigation xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/coffee_nav_graph" | ||
app:startDestination="@id/coffee_fragment"> | ||
|
||
<fragment | ||
android:id="@+id/coffee_fragment" | ||
android:name="com.lighthouse.features.coffee.ui.CoffeeFragment" /> | ||
</navigation> |
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 @@ | ||
/build |
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,30 @@ | ||
plugins { | ||
id("beep.android.library") | ||
id("beep.android.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.lighthouse.features.opensourcelicense" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.core) | ||
implementation(projects.coreAndroid) | ||
implementation(projects.model) | ||
implementation(projects.domain) | ||
implementation(projects.common) | ||
implementation(projects.commonAndroid) | ||
implementation(projects.uiCommon) | ||
|
||
implementation(libs.androidX.core.ktx) | ||
implementation(libs.androidX.appcompat) | ||
implementation(libs.androidX.constraintlayout) | ||
implementation(libs.androidX.fragment.ktx) | ||
|
||
implementation(libs.androidX.navigation.ui.ktx) | ||
implementation(libs.androidX.navigation.fragment.ktx) | ||
|
||
implementation(libs.material) | ||
|
||
implementation(libs.timber) | ||
} |
8 changes: 8 additions & 0 deletions
8
...e/src/main/java/com/lighthouse/features/opensourcelicense/ui/OpenSourceLicenseFragment.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.lighthouse.features.opensourcelicense.ui | ||
|
||
import androidx.fragment.app.Fragment | ||
import com.lighthouse.features.opensourcelicense.R | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class OpenSourceLicenseFragment : Fragment(R.layout.fragment_open_source_license) |
9 changes: 9 additions & 0 deletions
9
features/ui-opensourcelicense/src/main/res/layout/fragment_open_source_license.xml
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
10 changes: 10 additions & 0 deletions
10
features/ui-opensourcelicense/src/main/res/navigation/open_source_license_nav_graph.xml
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<navigation xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/open_source_license_nav_graph" | ||
app:startDestination="@id/open_source_license_fragment"> | ||
|
||
<fragment | ||
android:id="@+id/open_source_license_fragment" | ||
android:name="com.lighthouse.features.opensourcelicense.ui.OpenSourceLicenseFragment" /> | ||
</navigation> |
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 @@ | ||
/build |
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,30 @@ | ||
plugins { | ||
id("beep.android.library") | ||
id("beep.android.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.lighthouse.features.personalinfopolicy" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.core) | ||
implementation(projects.coreAndroid) | ||
implementation(projects.model) | ||
implementation(projects.domain) | ||
implementation(projects.common) | ||
implementation(projects.commonAndroid) | ||
implementation(projects.uiCommon) | ||
|
||
implementation(libs.androidX.core.ktx) | ||
implementation(libs.androidX.appcompat) | ||
implementation(libs.androidX.constraintlayout) | ||
implementation(libs.androidX.fragment.ktx) | ||
|
||
implementation(libs.androidX.navigation.ui.ktx) | ||
implementation(libs.androidX.navigation.fragment.ktx) | ||
|
||
implementation(libs.material) | ||
|
||
implementation(libs.timber) | ||
} |
8 changes: 8 additions & 0 deletions
8
...src/main/java/com/lighthouse/geatures/personalinfopolicy/ui/PersonalInfoPolicyFragment.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.lighthouse.geatures.personalinfopolicy.ui | ||
|
||
import androidx.fragment.app.Fragment | ||
import com.lighthouse.features.personalinfopolicy.R | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class PersonalInfoPolicyFragment : Fragment(R.layout.fragment_personal_info_policy) |
10 changes: 10 additions & 0 deletions
10
features/ui-personalinfopolicy/src/main/res/layout/fragment_personal_info_policy.xml
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
10 changes: 10 additions & 0 deletions
10
features/ui-personalinfopolicy/src/main/res/navigation/personal_info_policy_nav_graph.xml
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<navigation xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/personal_info_policy_nav_graph" | ||
app:startDestination="@id/personal_info_policy_fragment"> | ||
|
||
<fragment | ||
android:id="@+id/personal_info_policy_fragment" | ||
android:name="com.lighthouse.geatures.personalinfopolicy.ui.PersonalInfoPolicyFragment" /> | ||
</navigation> |
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,30 @@ | ||
plugins { | ||
id("beep.android.library") | ||
id("beep.android.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.lighthouse.features.security" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.core) | ||
implementation(projects.coreAndroid) | ||
implementation(projects.model) | ||
implementation(projects.domain) | ||
implementation(projects.common) | ||
implementation(projects.commonAndroid) | ||
implementation(projects.uiCommon) | ||
|
||
implementation(libs.androidX.core.ktx) | ||
implementation(libs.androidX.appcompat) | ||
implementation(libs.androidX.constraintlayout) | ||
implementation(libs.androidX.fragment.ktx) | ||
|
||
implementation(libs.androidX.navigation.ui.ktx) | ||
implementation(libs.androidX.navigation.fragment.ktx) | ||
|
||
implementation(libs.material) | ||
|
||
implementation(libs.timber) | ||
} |
6 changes: 6 additions & 0 deletions
6
features/ui-security/src/main/java/com/lighthouse/features/security/ui/SecurityFragment.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,6 @@ | ||
package com.lighthouse.features.security.ui | ||
|
||
import androidx.fragment.app.Fragment | ||
import com.lighthouse.features.security.R | ||
|
||
class SecurityFragment : Fragment(R.layout.fragment_security) |
9 changes: 9 additions & 0 deletions
9
features/ui-security/src/main/res/layout/fragment_security.xml
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
10 changes: 10 additions & 0 deletions
10
features/ui-security/src/main/res/navigation/security_nav_graph.xml
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<navigation xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/security_nav_graph" | ||
app:startDestination="@id/security_fragment"> | ||
|
||
<fragment | ||
android:id="@+id/security_fragment" | ||
android:name="com.lighthouse.features.security.ui.SecurityFragment"/> | ||
</navigation> |
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.