Skip to content

Commit

Permalink
Fix bug - ProgressDialog not correctly closed
Browse files Browse the repository at this point in the history
  • Loading branch information
LucBerge committed Sep 19, 2023
1 parent d6b9419 commit 22ed603
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected void onCreate(Bundle savedInstanceState) {
new BusinessPlanningAssistant.OnProsConsResponse() {
@Override
public void onSuccess(String pros, String cons) {
progressDialog.hide();
progressDialog.dismiss();
idea.sections.add(Section.createPros(pros));
idea.sections.add(Section.createCons(cons));
//TODO sections not added to the idea, use onCreateView instead ?
Expand All @@ -87,7 +87,7 @@ public void onSuccess(String pros, String cons) {

@Override
public void onError(Throwable error) {
progressDialog.hide();
progressDialog.dismiss();
error.printStackTrace();
Toast.makeText(EditIdeaActivity.this,
R.string.error_offline,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void onClick(View view) {
new BusinessPlanningAssistant.OnResponse() {
@Override
public void onSuccess(String title, String description, String problematic, String solution) {
progressDialog.hide();
progressDialog.dismiss();
IdeaWithSections ideaWithSections = new IdeaWithSections(new Idea(title, description));
ideaWithSections.sections.add(Section.createProblematic(problematic));
ideaWithSections.sections.add(Section.createSolution(solution));
Expand All @@ -107,7 +107,7 @@ public void onSuccess(String title, String description, String problematic, Stri

@Override
public void onError(Throwable error) {
progressDialog.hide();
progressDialog.dismiss();
error.printStackTrace();
Toast.makeText(getActivity(),
R.string.error_offline,
Expand Down

0 comments on commit 22ed603

Please sign in to comment.