mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 06:35:48 +03:00
fix conditions for multi account
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
8746e903cf
commit
d5b1891439
2 changed files with 3 additions and 3 deletions
|
@ -810,7 +810,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
|
||||
Uri data = intent.getData();
|
||||
if (data != null && data.toString().startsWith(getString(R.string.login_data_own_scheme))) {
|
||||
if (!MDMConfig.INSTANCE.multiAccountSupport(this) ||
|
||||
if (!MDMConfig.INSTANCE.multiAccountSupport(this) &&
|
||||
accountManager.getAccounts().length == 1) {
|
||||
Toast.makeText(this, R.string.no_mutliple_accounts_allowed, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
|
@ -1531,7 +1531,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
return;
|
||||
}
|
||||
|
||||
if (!MDMConfig.INSTANCE.multiAccountSupport(this) ||
|
||||
if (!MDMConfig.INSTANCE.multiAccountSupport(this) &&
|
||||
accountManager.getAccounts().length == 1) {
|
||||
Toast.makeText(this, R.string.no_mutliple_accounts_allowed, Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
|
|
|
@ -18,7 +18,7 @@ class DeepLinkLoginActivity : AuthenticatorActivity(), Injectable {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
if (!MDMConfig.multiAccountSupport(this) || accountManager.accounts.size == 1) {
|
||||
if (!MDMConfig.multiAccountSupport(this) && accountManager.accounts.size == 1) {
|
||||
Toast.makeText(this, R.string.no_mutliple_accounts_allowed, Toast.LENGTH_LONG).show()
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue