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:
Vivek Maskara 2018-07-03 19:59:26 +05:30 committed by Josephine Lim
parent 8859ff91e8
commit 306f23d1e2
3 changed files with 17 additions and 1 deletions

View file

@ -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);