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

Once the UpdateTimeRunnable is detached and the weakRefRttv cleared, it is never attached again #47

Closed
corneliudascalu opened this issue Apr 27, 2017 · 4 comments
Assignees
Labels

Comments

@corneliudascalu
Copy link
Contributor

In the stopTaskForPeriodicallyUpdatingRelativeTime() method, the mUpdateTimeTask is detached, resulting in the weak reference that connects it the the RelativeTimeView being cleared. In the startTaskForPeriodicallyUpdatingRelativeTime() method, the same mUpdateTimeTask is reused, but the weak reference is still null. As a consequence, the run() method in the runnable cannot update the text view.

It should be pretty easy to reproduce. Any action that results in the stopTaskForPeriodicallyUpdatingRelativeTime() method being called should cause the time to stop being updated. For example, minimize the app and restore it.

@corneliudascalu
Copy link
Contributor Author

@curioustechizen are you going to work on this? I can do a pull request with a fix within the hour.

@curioustechizen
Copy link
Owner

@corneliudascalu Thanks for reporting this. Already working on it (the solution is as simple as creating a new instance of the UpdateTimeRunnable in startTaskForPeriodicallyUpdatingRelativeTime())

curioustechizen added a commit that referenced this issue Apr 27, 2017
@curioustechizen
Copy link
Owner

Fixed in master. I'll close this issue once this shows up as 1.3.4 in maven central.

@curioustechizen
Copy link
Owner

Fixed in 1.3.4

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

No branches or pull requests

2 participants