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

App crash on multiple button clicks #277

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

vincent-karuri
Copy link

@vincent-karuri vincent-karuri commented Mar 5, 2018

This bug can be reproduced by applying multiple, quick and successive clicks to the record weight button, the growth chart button or the service card labels - all in the Child Immunization activity.

At the moment, such clicks cause the app to crash.

This fix prevents multiple instances of the same dialog fragment type from being opened if one already exists.

See more at #266

@opensrp opensrp deleted a comment Mar 5, 2018
@opensrp opensrp deleted a comment Mar 5, 2018
@coveralls
Copy link

coveralls commented Mar 5, 2018

Coverage Status

Coverage increased (+0.07%) to 6.906% when pulling a2ab020 on 266-app-crash-on-multiple-button-clicks into 7c40d87 on master.

…OpenSRP/opensrp-client-path into 266-app-crash-on-multiple-button-clicks
@opensrp opensrp deleted a comment Mar 5, 2018
@opensrp opensrp deleted a comment Mar 5, 2018
@vincent-karuri vincent-karuri self-assigned this Mar 5, 2018
@vincent-karuri vincent-karuri requested a review from keymane March 5, 2018 10:15
@vincent-karuri vincent-karuri requested review from manutarus and removed request for keymane March 5, 2018 10:16
@opensrp opensrp deleted a comment Mar 5, 2018
@opensrp opensrp deleted a comment Mar 5, 2018
@opensrp opensrp deleted a comment Mar 5, 2018
Signed-off-by: Ephraim Muhia <[email protected]>

Co-authored-by: Vincent Karuri <[email protected]>
@opensrp opensrp deleted a comment Mar 5, 2018
@opensrp opensrp deleted a comment Mar 6, 2018
@opensrp opensrp deleted a comment Mar 8, 2018
@opensrp opensrp deleted a comment Mar 8, 2018
@opensrp opensrp deleted a comment Mar 8, 2018
@opensrp opensrp deleted a comment Mar 8, 2018
1. Added the utility to Utils
2. Refactored ChildDetailTabbedActivity, ChildImmunizationActivity, HIA2ReportsActivity, NotInCatchmentDialogFragment, SetCsoDialogFragment, ChildUnderFiveFragment to use the new util
3. ChildDetailTabbedActivity returns false if dialog fails to open, line 416
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@opensrp opensrp deleted a comment Mar 11, 2018
@vincent-karuri vincent-karuri requested review from keymane and removed request for manutarus March 11, 2018 17:26
1. Add instance variable lastDialogOpened to the DuplicateDialogGuard
2. Remove lastDialogOpened instance variable from classes that previously had it
3. Set the dialogTag to a global DIALOG_TAG that is unique per fragment or activity
4. Remove dialogOpen instance variable from classes that previously had it
5. Adjust PROHIBITED_INTERVAL value
@opensrp opensrp deleted a comment Mar 16, 2018
@opensrp opensrp deleted a comment Mar 16, 2018
@opensrp opensrp deleted a comment Mar 16, 2018
@opensrp opensrp deleted a comment Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants