mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 20:19:42 +01:00
Fix credentials update
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
d59403bc97
commit
5000b3e9de
@ -460,11 +460,6 @@ public class SettingsController extends BaseController {
|
|||||||
messageText.setText(getResources().getString(R.string.nc_settings_account_updated));
|
messageText.setText(getResources().getString(R.string.nc_settings_account_updated));
|
||||||
messageView.setVisibility(View.VISIBLE);
|
messageView.setVisibility(View.VISIBLE);
|
||||||
break;
|
break;
|
||||||
case WRONG_ACCOUNT:
|
|
||||||
messageText.setTextColor(getResources().getColor(R.color.nc_darkRed));
|
|
||||||
messageText.setText(getResources().getString(R.string.nc_settings_wrong_account));
|
|
||||||
messageView.setVisibility(View.VISIBLE);
|
|
||||||
break;
|
|
||||||
case SERVER_WITHOUT_TALK:
|
case SERVER_WITHOUT_TALK:
|
||||||
messageText.setTextColor(getResources().getColor(R.color.nc_darkRed));
|
messageText.setTextColor(getResources().getColor(R.color.nc_darkRed));
|
||||||
messageText.setText(getResources().getString(R.string.nc_settings_wrong_account));
|
messageText.setText(getResources().getString(R.string.nc_settings_wrong_account));
|
||||||
|
@ -325,12 +325,6 @@ public class WebViewLoginController extends BaseController {
|
|||||||
UserEntity currentUser = userUtils.getCurrentUser();
|
UserEntity currentUser = userUtils.getCurrentUser();
|
||||||
|
|
||||||
ApplicationWideMessageHolder.MessageType messageType = null;
|
ApplicationWideMessageHolder.MessageType messageType = null;
|
||||||
if (currentUser != null && isPasswordUpdate &&
|
|
||||||
!currentUser.getUsername().equals(loginData.getUsername())) {
|
|
||||||
ApplicationWideMessageHolder.getInstance().setMessageType(
|
|
||||||
ApplicationWideMessageHolder.MessageType.WRONG_ACCOUNT);
|
|
||||||
getRouter().popToRoot();
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if (!isPasswordUpdate && userUtils.getIfUserWithUsernameAndServer(loginData.getUsername(), baseUrl)) {
|
if (!isPasswordUpdate && userUtils.getIfUserWithUsernameAndServer(loginData.getUsername(), baseUrl)) {
|
||||||
messageType = ApplicationWideMessageHolder.MessageType.ACCOUNT_UPDATED_NOT_ADDED;
|
messageType = ApplicationWideMessageHolder.MessageType.ACCOUNT_UPDATED_NOT_ADDED;
|
||||||
@ -339,7 +333,12 @@ public class WebViewLoginController extends BaseController {
|
|||||||
if (userUtils.checkIfUserIsScheduledForDeletion(loginData.getUsername(), baseUrl)) {
|
if (userUtils.checkIfUserIsScheduledForDeletion(loginData.getUsername(), baseUrl)) {
|
||||||
ApplicationWideMessageHolder.getInstance().setMessageType(
|
ApplicationWideMessageHolder.getInstance().setMessageType(
|
||||||
ApplicationWideMessageHolder.MessageType.ACCOUNT_SCHEDULED_FOR_DELETION);
|
ApplicationWideMessageHolder.MessageType.ACCOUNT_SCHEDULED_FOR_DELETION);
|
||||||
|
|
||||||
|
if (!isPasswordUpdate) {
|
||||||
getRouter().popToRoot();
|
getRouter().popToRoot();
|
||||||
|
} else {
|
||||||
|
getRouter().popCurrentController();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplicationWideMessageHolder.MessageType finalMessageType = messageType;
|
ApplicationWideMessageHolder.MessageType finalMessageType = messageType;
|
||||||
@ -391,7 +390,6 @@ public class WebViewLoginController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private LoginData parseLoginData(String prefix, String dataString) {
|
private LoginData parseLoginData(String prefix, String dataString) {
|
||||||
if (dataString.length() < prefix.length()) {
|
if (dataString.length() < prefix.length()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user