-
Notifications
You must be signed in to change notification settings - Fork 756
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
Feature/fga/mavericks 2 #4190
Feature/fga/mavericks 2 #4190
Conversation
… entirely migrating to flow
…ier when entirely migrating to flow" This reverts commit d9b02a2.
abstract class VectorViewModel<S : MvRxState, VA : VectorViewModelAction, VE : VectorViewEvents>(initialState: S) : | ||
BaseMvRxViewModel<S>(initialState, false) { | ||
abstract class VectorViewModel<S : MavericksState, VA : VectorViewModelAction, VE : VectorViewEvents>(initialState: S) : | ||
BaseMvRxViewModel<S>(initialState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still using BaseMvRxViewModel as we have some Rx. In the end it will be changed to MavericksViewModel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, can you create an issue to track the future change please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will investigate the issue with compiler.
Can you write a quick migration guide in /docs
, to help the fork to handle the required change please?
matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowExt.kt
Outdated
Show resolved
Hide resolved
matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowSession.kt
Outdated
Show resolved
Hide resolved
@@ -137,7 +138,7 @@ class VectorApplication : | |||
} | |||
logInfo() | |||
LazyThreeTen.init(this) | |||
|
|||
Mavericks.initialize(debugMode = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use BuildConfig.DEBUG ? (not checked the effect)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't as it will double check setState to be idempotent, but we have some "tricks" which breaks this
@@ -88,7 +89,7 @@ import timber.log.Timber | |||
import java.util.concurrent.TimeUnit | |||
import kotlin.system.measureTimeMillis | |||
|
|||
abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), HasScreenInjector { | |||
abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), HasScreenInjector, MvRxView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still use MvRxView here, and not MavericksView?
@@ -49,7 +50,7 @@ import io.reactivex.disposables.Disposable | |||
import timber.log.Timber | |||
import java.util.concurrent.TimeUnit | |||
|
|||
abstract class VectorBaseFragment<VB : ViewBinding> : BaseMvRxFragment(), HasScreenInjector { | |||
abstract class VectorBaseFragment<VB : ViewBinding> : Fragment(), MvRxView, HasScreenInjector { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same remark
Also can you add a file for the changelog please? |
…tended for external use." of MvRx `by viewModel()` calls. Maybe due to the inlining of code... This is a temporary fix...
FTR the allScreen sanity test is passing, but with settings test disabled due to an issue which was on develop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome stuff! 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the update!
This PR is introducing the migration to Mavericks 2.
Mavericks 2 is replacing usage of Rx by Flow internally and on the API too.
See here for more details: https://airbnb.io/mavericks/#/new-2x
So in this PR, you will find:
There is still some RxBinding and Behavior/SourceRelay to replace to finish the work.