-
Notifications
You must be signed in to change notification settings - Fork 731
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 flags base #4626
Feature flags base #4626
Conversation
- aims to have a centralised place for all feature login, overrideable by forks and debug flavours
- adds a dedicated routing activity to proxy the uri to the login selected by the feature flags
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
} else { | ||
clickOn(R.string.settings_notification_advanced) | ||
pressBack() | ||
when (BuildConfig.NOTIFICATION_SETTINGS_VERSION!!) { |
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.
Why not using a DefaultVectorFeatures
instance here? It would prevent the usage of !!
(I think)
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.
good point! I wasn't sure how the injections would work in the SanityTests
, I would invest more time but this is removed in #4627
@@ -145,6 +147,7 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor( | |||
refreshBackgroundSyncPrefs() | |||
|
|||
handleSystemPreference() | |||
handleVersionedSettings() |
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.
Can we observe some blink with this new way to hide preference? Maybe hide both pref by default in the XML
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's a blink if the visibility is updated in onResume
but onBindPref
is instant (as long as we stay on the main thread)
the programmatic visibility is also removed in #4627 🎉
@@ -309,6 +312,15 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor( | |||
} | |||
} | |||
|
|||
private fun handleVersionedSettings() { |
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.
this change is temporary as V2 is live, V1 is removed in #4627
Separates the SSO redirection from the
LoginActivity
+LoginActivity2
by using a dedicated invisibleSSORedirectRouterActivity
, this allows both activities to be enabled at the same time and not exportedIntroduces a
VectorFeatures
abstraction to start grouping our feature flags, this will also enable overriding at runtime and provides an entry point for forks to extend to help avoid conflicts (debug overrides to come in the next PR)Ports the
LoginVersion
andNotificationSettingsVersion
to theVectorFeatures