10000 MBL-1262: QA party bug fixes by Arkariang · Pull Request #1971 · kickstarter/android-oss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MBL-1262: QA party bug fixes #1971

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

Merged
merged 4 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
android:label="@string/app_name"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/SplashTheme">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
Expand Down Expand Up @@ -111,7 +110,6 @@
android:name=".ui.activities.ResetPasswordActivity"
android:parentActivityName=".ui.activities.LoginActivity"
android:windowSoftInputMode="adjustResize"
android:taskAffinity=""
android:theme="@style/Login" />
<activity
android:name=".ui.activities.SetPasswordActivity"
Expand Down Expand Up @@ -149,7 +147,7 @@
android:name=".ui.activities.LoginToutActivity"
android:parentActivityName=".ui.activities.DiscoveryActivity"
android:theme="@style/Login"
android:launchMode="singleInstancePerTask"
android:launchMode="singleTop"
android:exported="true">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
Expand Down Expand Up @@ -213,7 +211,6 @@
android:theme="@style/SettingsActivity" />
<activity
android:name=".ui.activities.SignupActivity"
android:taskAffinity=""
android:parentActivityName=".ui.activities.LoginToutActivity"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Login" />
Expand Down Expand Up @@ -256,7 +253,7 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="*.kickstarter.com"
android:host="www.kickstarter.com"
android:scheme="https" />
</intent-filter>
<!-- Website Main page deeplink -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ChangePasswordActivity : ComponentActivity() {
private val viewModel: ChangePasswordViewModel by viewModels {
viewModelFactory
}
private var oAuthIsEnabled = false

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand All @@ -46,6 +47,8 @@ class ChangePasswordActivity : ComponentActivity() {
theme = env.sharedPreferences()
?.getInt(SharedPreferenceKey.APP_THEME, AppThemes.MATCH_SYSTEM.ordinal)
?: AppThemes.MATCH_SYSTEM.ordinal

oAuthIsEnabled = env.featureFlagClient()?.getBoolean(FlagKey.ANDROID_OAUTH) ?: false
}

setContent {
Expand Down Expand Up @@ -98,10 +101,15 @@ class ChangePasswordActivity : ComponentActivity() {
private fun logout(email: String) {
this.logout?.execute()
ApplicationUtils.startNewDiscoveryActivity(this)
startActivity(
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)
}
startActivity(
intent
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ class LoginToutActivity : ComponentActivity() {
val authorizationUri = Uri.parse(url)

val tabIntent = CustomTabsIntent.Builder().build()
tabIntent.intent.flags = Intent.FLAG_ACTIVITY_NO_HISTORY

val packageName = ChromeTabsHelper.getPackageNameToUse(this)
tabIntent.intent.setPackage(packageName)
Expand Down
0