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

Multiple listeners getting created. #1088

Closed
1 of 2 tasks
angmas1 opened this issue Feb 13, 2019 · 0 comments
Closed
1 of 2 tasks

Multiple listeners getting created. #1088

angmas1 opened this issue Feb 13, 2019 · 0 comments

Comments

@angmas1
Copy link
Contributor

angmas1 commented Feb 13, 2019

Describe the bug
Code for listener to loadevents is written in oncreateview. Thus, multiple listeners are getting created when we go from one fragment to another and then come back.

To Reproduce
Steps to reproduce the behavior:

  1. Log when listeners are setup.(eg in eventdetailsfragment log in loadevents)
  2. Click on something which takes to another fragement (eg tickets)
  3. Press back.
  4. You will see log appearing twice. Keep repeating you will get multiple logs.

Expected behavior
Listener should be setup only once when we come back

Logs
2019-02-13 15:30:39.278 28770-28770/com.eventyay.attendee E/message: loading - open
2019-02-13 15:30:43.229 28770-28770/com.eventyay.attendee E/message: loading - came back 1st time
2019-02-13 15:30:43.273 28770-28770/com.eventyay.attendee E/message: loading - came back 1st time
2019-02-13 15:30:43.278 28770-28770/com.eventyay.attendee E/message: loading - came back 1st time
2019-02-13 15:30:46.130 28770-28770/com.eventyay.attendee E/message: loading - came back 2nd time
2019-02-13 15:30:46.173 28770-28770/com.eventyay.attendee E/message: loading - came back 2nd time
2019-02-13 15:30:46.178 28770-28770/com.eventyay.attendee E/message: loading - came back 2nd time
2019-02-13 15:30:46.182 28770-28770/com.eventyay.attendee E/message: loading - came back 2nd time
2019-02-13 15:30:48.251 28770-28770/com.eventyay.attendee E/message: loading - came back 3rd time
2019-02-13 15:30:48.293 28770-28770/com.eventyay.attendee E/message: loading - came back 3rd time
2019-02-13 15:30:48.299 28770-28770/com.eventyay.attendee E/message: loading - came back 3rd time
2019-02-13 15:30:48.305 28770-28770/com.eventyay.attendee E/message: loading - came back 3rd time
2019-02-13 15:30:48.309 28770-28770/com.eventyay.attendee E/message: loading - came back 3rd time

Would you like to work on the issue?

  • Yes
  • No
  • Other:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant