mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Force login when no active session is found while uploading an image (#1684)
* Force login when no active session is found while uploading an image * Updated not logged in message
This commit is contained in:
parent
8859ff91e8
commit
306f23d1e2
3 changed files with 17 additions and 1 deletions
|
|
@ -5,6 +5,8 @@ import android.accounts.AccountManager;
|
|||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import fr.free.nrw.commons.mwapi.MediaWikiApi;
|
||||
import io.reactivex.Completable;
|
||||
import io.reactivex.Observable;
|
||||
|
|
@ -31,6 +33,7 @@ public class SessionManager {
|
|||
/**
|
||||
* @return Account|null
|
||||
*/
|
||||
@Nullable
|
||||
public Account getCurrentAccount() {
|
||||
if (currentAccount == null) {
|
||||
AccountManager accountManager = AccountManager.get(context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue