Git Product home page Git Product logo

Comments (7)

passsy avatar passsy commented on August 18, 2024 1

We fixed the bug together here is the resulting PR: k0shk0sh/FastHub#116

The Activity was "initializing" the presenter differently based on saveInstanceState being null or not with the data from getIntent(). The correct way is to pass the intent data in providePresenter.

The Activity now starts after process death like it would start initially and the problems are gone.

from thirtyinch.

vRallev avatar vRallev commented on August 18, 2024

Did the process die when the app was in background? That would be my guess.

from thirtyinch.

k0shk0sh avatar k0shk0sh commented on August 18, 2024

@vRallev I'm not really sure tho, the activities in backstack remains but of course losing their data as well which causes me to re-init the whole activities again. basically it would look like this
Activity A > B > C.
on app resume, C presenter lost it's data. press back B lost its data, press back to A, A as well lost its data.

Its weird tbh. I don't think we have this issue if we use the stable version which one of the company I'm working at has it on the production app and everything seems to be working fine.

from thirtyinch.

vRallev avatar vRallev commented on August 18, 2024

Maybe there's a difference between those version, but I didn't catch something important.

You can reproduce the behavior easily if you press home and kill the app process (this can be done from the IDE) and then reopen the app from the recent list. We had the same issue, that's why I created #50 and #51. This fixed this issue for us.

from thirtyinch.

k0shk0sh avatar k0shk0sh commented on August 18, 2024

I might be cloning your fork and give it a shot I had love to see it in ThirtyInch tbh. I can't really tell why it's not merged but I'm sure @passsy has his own thought on this.
thanks for your help.

from thirtyinch.

passsy avatar passsy commented on August 18, 2024

Thanks for the report. It would be helpful when you enable the logging for Ti (TiLog.setLogger(TiLog.LOGCAT);). So we can see what exactly happens to the presenters.

I checked the diff between rc2 and rc3 but didn't notice changes when saving or recovering the presenter. Are you using Activity Presenters only? Because Fragments where refactored (hopefully without problems).

Since FastHub is open source I'd like to debug the problem there myself. Can you tell me where exactly your Presenters get lost?

You already have a BasePresenter and adding support for onSaveInstanceState can be added with a few lines of code (especially when using reflection). That's why #50 isn't merged, yet.

from thirtyinch.

k0shk0sh avatar k0shk0sh commented on August 18, 2024

Hello . @passsy , Thanks for your reply, the losing of state mostly happens in RepoPagerView and anywhere else tho.

I'll be waiting for your feedback on this.
Thank you again Pascal.

from thirtyinch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.