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

Added new invalid network message on ereferals #2306

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,21 @@ public void onLogoutError(java.lang.String message) {
}
}

@Override
public void onLoginNetworkError(Credentials credentials) {
loginActivity.hideProgressBar();
ICredentialsRepository credentialsLocalDataSource = new CredentialsLocalDataSource();
Credentials savedCredentials = credentialsLocalDataSource.getLastValidCredentials();
if(savedCredentials!=null && savedCredentials.getPassword()!=null &&
!savedCredentials.getPassword().equals(credentials.getPassword())
&& savedCredentials.getUsername().equals(credentials.getUsername())
&& savedCredentials.getServerURL().equals(credentials.getServerURL())){
loginActivity.showError(loginActivity.getString(R.string.login_invalid_credentials_and_network));
}else {
loginActivity.showError(loginActivity.getString(R.string.network_error));
}
}

private void launchPull(boolean isDemo) {
PullFilters pullFilters = new PullFilters();
pullFilters.setStartDate(PreferencesState.getInstance().getDateStarDateLimitFilter());
Expand Down
1 change: 1 addition & 0 deletions app/src/ereferrals/res/values-ne/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -974,4 +974,5 @@
<string name="settings_title_program_url_config">"प्रोग्राम विन्यास URL"</string>
<string name="settings_title_program_username_config">"प्रोग्राम कन्फिगरेसन प्रयोगकर्ता नाम"</string>
<string name="settings_title_program_password_config">"प्रोग्राम कन्फिगरेसन पासवर्ड"</string>
<string name="login_invalid_credentials_and_network">"प्रमाणपत्रहरू अमान्य छन् वा प्रमाणपत्रहरू अमान्य छन् र जडान उपलब्ध छैन"</string>
</resources>
1 change: 1 addition & 0 deletions app/src/ereferrals/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -969,4 +969,5 @@
<string name="settings_title_program_url_config">"URL de configuração do programa"</string>
<string name="settings_title_program_username_config">"Nome de usuário da configuração do programa"</string>
<string name="settings_title_program_password_config">"Senha de configuração do programa"</string>
<string name="login_invalid_credentials_and_network">"As credenciais são inválidas ou as credenciais são inválidas e a conexão não está disponível"</string>
</resources>
1 change: 1 addition & 0 deletions app/src/ereferrals/res/values-sw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1028,4 +1028,5 @@ Ameahidi kuhudhuria"</string>
<string name="settings_title_program_url_config">"Programkonfigurationsadress"</string>
<string name="settings_title_program_username_config">"Programkonfigurations användarnamn"</string>
<string name="settings_title_program_password_config">"Programkonfigurationslösenord"</string>
<string name="login_invalid_credentials_and_network">"Inloggningsuppgifterna är ogiltiga eller referensuppgifterna är ogiltiga och connexion är inte tillgängligt"</string>
</resources>
1 change: 1 addition & 0 deletions app/src/ereferrals/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@
<string name="date_format_forward_slash">"yyyy/mm/dd"</string>
<string name="network_error">"There is a problem with the network, please try again later."</string>
<string name="login_invalid_credentials">"Invalid credentials"</string>
<string name="login_invalid_credentials_and_network">"The credentials are invalid or the credentials are invalid and connexion is not available"</string>
<string name="login_unexpected_error">"An error has occurred, please try again later"</string>
<string name="login_invalid_server_url">"Invalid Server URL"</string>
<string name="error_conflict_message">"The event with UID: %1$s. was uploaded with conflict in the data element UID: %2$s with the message: %3$s. Please contact the administrator."</string>
Expand Down