Skip to content

Commit

Permalink
MBL-1336: Remove OAuth feature flag (#2007)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkariang authored Apr 4, 2024
1 parent e21813b commit 9bf2be6
Show file tree
Hide file tree
Showing 27 changed files with 20 additions and 3,919 deletions.
17 changes: 0 additions & 17 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,10 @@
android:theme="@style/WebViewActivity" />
<activity
android:name=".ui.activities.ResetPasswordActivity"
android:parentActivityName=".ui.activities.LoginActivity"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Login" />
<activity
android:name=".ui.activities.SetPasswordActivity"
android:parentActivityName=".ui.activities.LoginActivity"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Login" />
<activity
Expand All @@ -138,11 +136,6 @@
<activity
android:name=".ui.activities.ProfileActivity"
android:parentActivityName=".ui.activities.DiscoveryActivity" />
<activity
android:name=".ui.activities.LoginActivity"
android:parentActivityName=".ui.activities.LoginToutActivity"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Login" />
<activity
android:name=".ui.activities.LoginToutActivity"
android:parentActivityName=".ui.activities.DiscoveryActivity"
Expand Down Expand Up @@ -209,23 +202,13 @@
android:name=".ui.activities.SettingsActivity"
android:parentActivityName=".ui.activities.DiscoveryActivity"
android:theme="@style/SettingsActivity" />
<activity
android:name=".ui.activities.SignupActivity"
android:parentActivityName=".ui.activities.LoginToutActivity"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Login" />
<activity
android:name=".ui.activities.SurveyResponseActivity"
android:parentActivityName=".ui.activities.ActivityFeedActivity" /> <!-- TODO: Maybe the parent should be the project? -->
<activity
android:name=".ui.activities.ThanksActivity"
android:parentActivityName=".ui.activities.DiscoveryActivity"
android:theme="@style/ThanksActivity" />
<activity
android:name=".ui.activities.TwoFactorActivity"
android:parentActivityName=".ui.activities.LoginActivity"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Login" />
<activity
android:name=".ui.activities.UpdateActivity"
android:parentActivityName=".ui.activities.ProjectUpdatesActivity" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.kickstarter.models.Project
import com.kickstarter.ui.IntentKey
import com.kickstarter.ui.activities.CommentsActivity
import com.kickstarter.ui.activities.CreatorBioActivity
import com.kickstarter.ui.activities.LoginActivity
import com.kickstarter.ui.activities.LoginToutActivity
import com.kickstarter.ui.activities.PaymentMethodsSettingsActivity
import com.kickstarter.ui.activities.PreLaunchProjectPageActivity
import com.kickstarter.ui.activities.ProjectPageActivity
Expand Down Expand Up @@ -162,7 +162,7 @@ fun Intent.getLoginActivityIntent(
email: String? = null,
loginReason: LoginReason? = null
): Intent {
return this.setClass(context, LoginActivity::class.java).apply {
return this.setClass(context, LoginToutActivity::class.java).apply {
loginReason?.let {
this.putExtra(IntentKey.LOGIN_REASON, it)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ import com.kickstarter.libs.Logout
import com.kickstarter.libs.featureflag.FlagKey
import com.kickstarter.libs.utils.ApplicationUtils
import com.kickstarter.libs.utils.extensions.getEnvironment
import com.kickstarter.ui.IntentKey
import com.kickstarter.ui.SharedPreferenceKey
import com.kickstarter.ui.activities.compose.ChangePasswordScreen
import com.kickstarter.ui.compose.designsystem.KickstarterApp
import com.kickstarter.ui.data.LoginReason
import com.kickstarter.viewmodels.ChangePasswordViewModel
import com.kickstarter.viewmodels.ChangePasswordViewModelFactory
import io.reactivex.disposables.CompositeDisposable
Expand Down Expand Up @@ -101,13 +99,7 @@ class ChangePasswordActivity : ComponentActivity() {
private fun logout(email: String) {
this.logout?.execute()
ApplicationUtils.startNewDiscoveryActivity(this)
val intent = if (oAuthIsEnabled) {
Intent(this, LoginToutActivity::class.java)
} else {
Intent(this, LoginActivity::class.java)
.putExtra(IntentKey.LOGIN_REASON, LoginReason.CHANGE_PASSWORD)
.putExtra(IntentKey.EMAIL, email)
}
val intent = Intent(this, LoginToutActivity::class.java)
startActivity(
intent
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ import com.kickstarter.libs.featureflag.FlagKey
import com.kickstarter.libs.utils.ApplicationUtils
import com.kickstarter.libs.utils.extensions.addToDisposable
import com.kickstarter.libs.utils.extensions.getEnvironment
import com.kickstarter.ui.IntentKey
import com.kickstarter.ui.SharedPreferenceKey
import com.kickstarter.ui.activities.compose.login.CreatePasswordScreen
import com.kickstarter.ui.compose.designsystem.KickstarterApp
import com.kickstarter.ui.data.LoginReason
import com.kickstarter.viewmodels.CreatePasswordViewModel
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable
Expand Down Expand Up @@ -105,9 +103,7 @@ class CreatePasswordActivity : AppCompatActivity() {
this.logout?.execute()
ApplicationUtils.startNewDiscoveryActivity(this)
startActivity(
Intent(this, LoginActivity::class.java)
.putExtra(IntentKey.LOGIN_REASON, LoginReason.CREATE_PASSWORD)
.putExtra(IntentKey.EMAIL, email)
Intent(this, LoginToutActivity::class.java)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class FacebookConfirmationActivity : BaseActivity<FacebookConfirmationViewModel.
}

private fun loginWithEmailClick() {
val intent = Intent(this, LoginActivity::class.java)
val intent = Intent(this, LoginToutActivity::class.java)
startActivityForResult(intent, ActivityRequestCodes.LOGIN_FLOW)
TransitionUtils.transition(this, TransitionUtils.slideInFromRight())
}
Expand Down
Loading

0 comments on commit 9bf2be6

Please sign in to comment.