Comments (7)
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.
Did the process die when the app was in background? That would be my guess.
from thirtyinch.
@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.
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.
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.
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.
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)
- Debugging a @CallOnMainThread annotated method crashes the app HOT 2
- Create Kotlin module/extensions HOT 2
- Switch from compileOnly to implementation HOT 1
- [Discussion] Should manageViewDisposable() throw an exception
- Support for AndroidX HOT 4
- BackstackReader doesn't work with AndroidX HOT 3
- "Don't add observers when the presenter reached the DESTROYED state" EXCEPTION HOT 1
- sendToView HOT 4
- Lint warning with sendToView, but not with deliverToView
- Why saving the Presenter on orientation change HOT 1
- Problems with @CallOnMainThread
- Lint does not report by abstract classes without implementation View
- Crash using AndroidX with ProGuard enabled HOT 2
- Lint reports: Obsolete custom lint check
- bundle[buildType] was replaced with AGP 3.2.0
- Package thirtyinch-kotlin-coroutines not published HOT 3
- Plugin module not available with version 0.9.5 HOT 2
- Release for androidx HOT 2
- Restore old BackstackReader.isInBackstack() implementation once AndroidX Fragment 1.2.1 is released HOT 1
- Migrate away from JCenter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thirtyinch.