Handle login errors
This commit is contained in:
+4
-2
@@ -25,6 +25,7 @@ import android.util.Log;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
@@ -101,7 +102,8 @@ public class LoginActivity extends NextcloudMapsStyledActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
// TODO handle errors
|
Toast.makeText(LoginActivity.this, R.string.login_error, Toast.LENGTH_SHORT).show();
|
||||||
|
progress.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -114,7 +116,7 @@ public class LoginActivity extends NextcloudMapsStyledActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (AccountImportCancelledException e) {
|
} catch (AccountImportCancelledException e) {
|
||||||
e.printStackTrace();
|
progress.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
<!-- Login Activity -->
|
<!-- Login Activity -->
|
||||||
<string name="choose_account">Scegli account</string>
|
<string name="choose_account">Scegli account</string>
|
||||||
|
<string name="login_error">Si è verificato un errore durante la login</string>
|
||||||
|
|
||||||
<!-- Geofavorites list -->
|
<!-- Geofavorites list -->
|
||||||
<string name="new_geobookmark">Nuovo geosegnalibro</string>
|
<string name="new_geobookmark">Nuovo geosegnalibro</string>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
<!-- Login Activity -->
|
<!-- Login Activity -->
|
||||||
<string name="choose_account">Choose account</string>
|
<string name="choose_account">Choose account</string>
|
||||||
|
<string name="login_error">An error has occurred during the login</string>
|
||||||
|
|
||||||
<!-- Geofavorites list -->
|
<!-- Geofavorites list -->
|
||||||
<string name="new_geobookmark">New geofavorite</string>
|
<string name="new_geobookmark">New geofavorite</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user