Skip to content

Commit

Permalink
Remove re-initialization of ff
Browse files Browse the repository at this point in the history
  • Loading branch information
dalkia committed Jan 15, 2025
1 parent af97e55 commit b7e4285
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public static async UniTask<FeatureFlagsConfiguration> InitializeAsync(
if(appParameters.TryGetValue(AppArgsFlags.FeatureFlags.HOSTNAME, out string hostName))
options.Hostname = hostName;

//NOTE: This only works for already logged in users. There was a time before PR where the feature flags where re-initialized again after a fresh login.
//The problem is that systems were initialized in the bootstrapper, way before the login. So that may generate inconsistencies
//Its not a feature we have ever used, so its fine to leave it like this. If you ever need it, please check the PR on how to readd it and remove the inconsistencies.
options.UserId = userAddress;

return await featureFlagsProvider.GetAsync(options, ct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class LoadingStatus : ILoadingStatus
[LoadingStage.UnloadCacheChecking] = 0.05f,
[LoadingStage.LiveKitConnectionEnsuring] = 0.1f, //Used in initialization Flow
[LoadingStage.LivekitStopping] = 0.1f, //Used in Teleport Flow
[LoadingStage.FeatureFlagInitializing] = 0.15f,
[LoadingStage.RealmChanging] = 0.25f, //Used in Teleport Flow
[LoadingStage.ProfileLoading] = 0.2f,
[LoadingStage.EnvironmentMiscSetting] = 0.25f,
Expand All @@ -38,7 +37,6 @@ public enum LoadingStage : byte
Init,
AuthenticationScreenShowing,
LiveKitConnectionEnsuring,
FeatureFlagInitializing,
UnloadCacheChecking,
ProfileLoading,
EnvironmentMiscSetting,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public RealUserInAppInitializationFlow(
AudioClipConfig backgroundMusic,
IRealmNavigator realmNavigator,
ILoadingScreen loadingScreen,
IFeatureFlagsProvider featureFlagsProvider,
FeatureFlagsCache featureFlagsCache,
IWeb3IdentityCache web3IdentityCache,
IRealmController realmController,
IRealmMisc realmMisc,
ILandscape landscape,
Expand All @@ -88,7 +86,6 @@ ChatHistory chatHistory
this.roomHub = roomHub;

var ensureLivekitConnectionStartupOperation = new EnsureLivekitConnectionStartupOperation(loadingStatus, livekitHealthCheck);
var initializeFeatureFlagsStartupOperation = new InitializeFeatureFlagsStartupOperation(loadingStatus, featureFlagsProvider, web3IdentityCache, decentralandUrlsSource, appParameters);
var preloadProfileStartupOperation = new PreloadProfileStartupOperation(loadingStatus, selfProfile);
var switchRealmMiscVisibilityStartupOperation = new SwitchRealmMiscVisibilityStartupOperation(loadingStatus, realmController, realmMisc);
loadPlayerAvatarStartupOperation = new LoadPlayerAvatarStartupOperation(loadingStatus, selfProfile, mainPlayerAvatarBaseProxy);
Expand All @@ -101,7 +98,6 @@ ChatHistory chatHistory
startupOperation = new SequentialStartupOperation(
loadingStatus,
ensureLivekitConnectionStartupOperation,
initializeFeatureFlagsStartupOperation,
preloadProfileStartupOperation,
switchRealmMiscVisibilityStartupOperation,
loadPlayerAvatarStartupOperation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,7 @@ static IMultiPool MultiPoolFactory() =>
backgroundMusic,
baseRealmNavigator,
loadingScreen,
staticContainer.FeatureFlagsProvider,
staticContainer.FeatureFlagsCache,
identityCache,
realmController,
realmMisc,
landscape,
Expand Down

0 comments on commit b7e4285

Please sign in to comment.