diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 11425764ffa098df4e4919337b107ceae75f2ba7..48788c86a6051234c55463c87f54843bc588dae0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -136,16 +136,11 @@ <string name="select_circles_in_which_you_want_to_follow_this_timeline">Select circles in which you want to follow this timeline</string> <string name="accept_invite">Accept invite</string> <string name="edit_profile">Edit Profile</string> - <string name="change_password">Change password</string> <string name="login_sessions">Login sessions</string> <string name="deactivate_my_account">Deactivate my account</string> <string name="settings">Settings</string> <string name="user_id">User ID</string> <string name="profile_updated">Profile updated</string> - <string name="new_password">New password</string> - <string name="old_password">Old Password</string> - <string name="repeat_new_password">Repeat new password</string> - <string name="password_changed">Password changed</string> <string name="deactivate_message">This will make your account permanently unusable. You will not be able to log in, and no one will be able to re-register the same user lD. This will cause your account to leave all rooms it is participating in, and it will remove your account details from your identity server. This action is irreversible.</string> <string name="deactivate">Deactivate</string> <string name="invalid_auth">Invalid auth</string> diff --git a/settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordDataSource.kt b/auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordDataSource.kt similarity index 96% rename from settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordDataSource.kt rename to auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordDataSource.kt index 6446405c807d289c58a74f642cce2ffa00168fb1..4653f5f44660942baac48f5396c8fb70a7a5e9c3 100644 --- a/settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordDataSource.kt +++ b/auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordDataSource.kt @@ -1,4 +1,4 @@ -package org.futo.circles.settings.feature.change_password +package org.futo.circles.auth.feature.change_password import org.futo.circles.auth.feature.pass_phrase.create.CreatePassPhraseDataSource import org.futo.circles.auth.feature.pass_phrase.restore.RestoreBackupDataSource diff --git a/settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordDialogFragment.kt b/auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordDialogFragment.kt similarity index 94% rename from settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordDialogFragment.kt rename to auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordDialogFragment.kt index cfabc5fa31e22628eb60b2ecbb26ca57f1551535..af133a60be76e41a58478d32a1681746582378fb 100644 --- a/settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordDialogFragment.kt +++ b/auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordDialogFragment.kt @@ -1,4 +1,4 @@ -package org.futo.circles.settings.feature.change_password +package org.futo.circles.auth.feature.change_password import android.os.Bundle import android.view.View @@ -6,6 +6,8 @@ import androidx.core.widget.doAfterTextChanged import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels import dagger.hilt.android.AndroidEntryPoint +import org.futo.circles.auth.R +import org.futo.circles.auth.databinding.DialogFragmentChangePasswordBinding import org.futo.circles.core.extensions.getText import org.futo.circles.core.extensions.observeData import org.futo.circles.core.extensions.observeResponse @@ -15,8 +17,6 @@ import org.futo.circles.core.extensions.showSuccess import org.futo.circles.core.fragment.BaseFullscreenDialogFragment import org.futo.circles.core.fragment.HasLoadingState import org.futo.circles.core.view.LoadingDialog -import org.futo.circles.settings.R -import org.futo.circles.settings.databinding.DialogFragmentChangePasswordBinding @AndroidEntryPoint class ChangePasswordDialogFragment : diff --git a/settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordViewModel.kt b/auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordViewModel.kt similarity index 95% rename from settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordViewModel.kt rename to auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordViewModel.kt index 2897e4281e2072688c7b7d668e6672684b2e4ddf..8aadd465654d59bd46919d48a62cb10428f765a4 100644 --- a/settings/src/main/java/org/futo/circles/settings/feature/change_password/ChangePasswordViewModel.kt +++ b/auth/src/main/java/org/futo/circles/auth/feature/change_password/ChangePasswordViewModel.kt @@ -1,4 +1,4 @@ -package org.futo.circles.settings.feature.change_password +package org.futo.circles.auth.feature.change_password import androidx.lifecycle.ViewModel import dagger.hilt.android.lifecycle.HiltViewModel diff --git a/settings/src/main/res/layout/dialog_fragment_change_password.xml b/auth/src/main/res/layout/dialog_fragment_change_password.xml similarity index 100% rename from settings/src/main/res/layout/dialog_fragment_change_password.xml rename to auth/src/main/res/layout/dialog_fragment_change_password.xml diff --git a/auth/src/main/res/values/strings.xml b/auth/src/main/res/values/strings.xml index 1fc08a148f3ff4649ae6a925f47801663b34ddd1..7081e14549cf73fd1663c27443487030a1c66128 100644 --- a/auth/src/main/res/values/strings.xml +++ b/auth/src/main/res/values/strings.xml @@ -103,6 +103,11 @@ <string name="switch_user">Switch User</string> <string name="switch_user_message">Are you sure you want to switch user?</string> <string name="switch_str">Switch</string> + <string name="change_password">Change password</string> + <string name="new_password">New password</string> + <string name="old_password">Old Password</string> + <string name="repeat_new_password">Repeat new password</string> + <string name="password_changed">Password changed</string> <plurals name="days"> <item quantity="one">%1$d day</item> diff --git a/settings/src/main/java/org/futo/circles/settings/feature/SettingsDataSource.kt b/settings/src/main/java/org/futo/circles/settings/feature/SettingsDataSource.kt index 1aa1ddedc75a8e0d07e8417b801945f4866b2a0f..2fa2296544561b1fe7781c53afa8bab04b76fd66 100644 --- a/settings/src/main/java/org/futo/circles/settings/feature/SettingsDataSource.kt +++ b/settings/src/main/java/org/futo/circles/settings/feature/SettingsDataSource.kt @@ -10,13 +10,13 @@ import org.futo.circles.core.extensions.Response import org.futo.circles.core.extensions.createResult import org.futo.circles.core.provider.MatrixSessionProvider import org.futo.circles.settings.R -import org.futo.circles.settings.feature.change_password.ChangePasswordDataSource +import org.futo.circles.auth.feature.change_password.ChangePasswordDataSource import java.io.File import javax.inject.Inject class SettingsDataSource @Inject constructor( @ApplicationContext private val context: Context, - private val changePasswordDataSource: ChangePasswordDataSource, + private val changePasswordDataSource: org.futo.circles.auth.feature.change_password.ChangePasswordDataSource, private val authConfirmationProvider: AuthConfirmationProvider ) { diff --git a/app/src/main/res/drawable/ic_unverified.xml b/settings/src/main/res/drawable/ic_unverified.xml similarity index 100% rename from app/src/main/res/drawable/ic_unverified.xml rename to settings/src/main/res/drawable/ic_unverified.xml diff --git a/app/src/main/res/drawable/ic_verified.xml b/settings/src/main/res/drawable/ic_verified.xml similarity index 100% rename from app/src/main/res/drawable/ic_verified.xml rename to settings/src/main/res/drawable/ic_verified.xml