-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #865 - Don't show success dialog when OBA API issue report fails
* The communication failure case wasn't being handled properly in ReportProblemFragmentBase. This may have partially been due to a somewhat misnamed callback ("onSendReport()" instead of "onReportSent()". That callback should only happen if communication with the server is successful, and instead for non-Open311 issue reports (i.e., sending to OBA REST API) it was called when the loader was started (i.e., before the API request happens). This patch moves the callback to onLoadFinished when success is confirmed and also renames the callback to be clearer in intent. * Additionally, the success case of OBA REST API issue reporting in ReportProblemFragmentBase wasn't handled correctly. Old logic from pre-Open311 support was being used that simply popped the fragment off the backstack with the mGoBackHandler (the old issue report UI was a single fragment). This behavior was hidden by the above bug that triggered the success dialog (and then activity finishing) upon success or failure of API request. This patch removes that old logic and replaces it with the correct callback to the listener.
- Loading branch information
Showing
4 changed files
with
9 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters