grzegorznittner / chanu

Chanu - 4chan for Android
https://play.google.com/store/apps/details?id=com.chanapps.four.activity
GNU General Public License v3.0
74 stars 32 forks source link

fix bug where rotating the screen in a thread will take you back to the ... #426

Closed yate closed 9 years ago

yate commented 9 years ago

...board page

For some reason screen rotation was causing the switchBoard method to be called in ThreadActivity, which starts a new BoardActivity. I couldn't figure out why it is calling that but the simple fix is to check if the board you're switching to is already your current board, then no action is required.

There was also an issue when if you rotated the screen on a thread, then picked a new board, the board would not load. I had to modify the if in BoardActivity in order for it to refresh properly, i'm not sure of the consequences of that.

I also removed some of the finish() calls, I don't know if they're necessary or not but it seems to work without it, and android will end up killing the activity right?

johnarleyburns commented 9 years ago

this seems okay, i think we just test it some for awhile and see how it works. a lot of the code around boards is convoluted unfortunately On Oct 18, 2014 11:07 PM, "yate" notifications@github.com wrote:

...board page

For some reason screen rotation was causing the switchBoard method to be called in ThreadActivity, which starts a new BoardActivity. I couldn't figure out why it is calling that but the simple fix is to check if the board you're switching to is already your current board, then no action is required.

There was also an issue when if you rotated the screen on a thread, then picked a new board, the board would not load. I had to modify the if in BoardActivity in order for it to refresh properly, i'm not sure of the consequences of that.

I also removed some of the finish() calls, I don't know if they're necessary or not but it seems to work without it, and android will end up

killing the activity right?

You can merge this Pull Request by running

git pull https://github.com/yate/chanu rotation-fix

Or view, comment on, or merge it at:

https://github.com/grzegorznittner/chanu/pull/426 Commit Summary

  • fix bug where rotating the screen in a thread will take you back to the board page

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/grzegorznittner/chanu/pull/426.

yate commented 9 years ago

Did you get a chance to test this one yet? Its been working okay for me so far.

yate commented 9 years ago

FYI this will fix the issue that Javier Ruiz is talking about in this thread. I can take a closer look and try to figure out why the event is being called in the first place, if that would be worthwhile.

johnarleyburns commented 9 years ago

I tried to refactor at one point but ended up breaking other things. On Nov 3, 2014 7:13 PM, "yate" notifications@github.com wrote:

FYI this will fix the issue that Javier Ruiz is talking about in this thread https://plus.google.com/103528179847058661880/posts/9PTsKtYeabf. I can take a closer look and try to figure out why the event is being called in the first place, if that would be worthwhile.

— Reply to this email directly or view it on GitHub https://github.com/grzegorznittner/chanu/pull/426#issuecomment-61578518.

yate commented 9 years ago

Do you want to merge for now and we can try to refactor later?

johnarleyburns commented 9 years ago

okay done, will be nice if it fixes it for everyone On Nov 3, 2014 9:30 PM, "yate" notifications@github.com wrote:

Do you want to merge for now and we can try to refactor later?

— Reply to this email directly or view it on GitHub https://github.com/grzegorznittner/chanu/pull/426#issuecomment-61588668.

yate commented 9 years ago

Cool I hope so. What do you think about doing a release (if you don't run into any issues)? It would include this and the memory fixes

johnarleyburns commented 9 years ago

Yes, but we need to up the android version number. Also the publisher is no longer ChanApps LLC but the nonprofit Free Apps Foundation, Inc. email for support is john@faf.io. Also we need to add you in the credits. On Nov 4, 2014 5:42 PM, "yate" notifications@github.com wrote:

Cool I hope so. What do you think about doing a release (if you don't run into any issues)? It would include this and the memory fixes

— Reply to this email directly or view it on GitHub https://github.com/grzegorznittner/chanu/pull/426#issuecomment-61589223.