Skip to content
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

FOR DISCUSSION: Using coroutines for login #5695

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ dependencies {
implementation 'com.dinuscxj:circleprogressbar:1.1.1'
implementation 'com.karumi:dexter:5.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.7.0"

implementation "com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:$ADAPTER_DELEGATES_VERSION"
implementation "com.hannesdorfmann:adapterdelegates4-pagination:$ADAPTER_DELEGATES_VERSION"
Expand Down Expand Up @@ -186,7 +189,7 @@ project.gradle.taskGraph.whenReady {
}

android {
compileSdkVersion 33
compileSdkVersion 34

defaultConfig {
//applicationId 'fr.free.nrw.commons'
Expand All @@ -196,7 +199,7 @@ android {
setProperty("archivesBaseName", "app-commons-v$versionName-" + getBranchName())

minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: 'true'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ public void onLogoutComplete() {
if (loginMessage != null) {
loginIntent.putExtra(loginMessageIntentKey, loginMessage);
}

if (userName != null) {
loginIntent.putExtra(loginUsernameIntentKey, userName);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package fr.free.nrw.commons.actions

import fr.free.nrw.commons.CommonsApplication
import fr.free.nrw.commons.di.NetworkingModule.NAMED_COMMONS_CSRF
import fr.free.nrw.commons.wikidata.WikidataConstants.NAMED_COMMONS_CSRF
import io.reactivex.Observable
import fr.free.nrw.commons.auth.csrf.CsrfTokenClient
import fr.free.nrw.commons.auth.csrf.InvalidLoginTokenException
import fr.free.nrw.commons.auth.login.LoginFailedException
import javax.inject.Inject
import javax.inject.Named
import javax.inject.Singleton
Expand Down
Loading
Loading