| | 1 | | using DCL; |
| | 2 | | using DCL.Helpers; |
| | 3 | | using ExploreV2Analytics; |
| | 4 | | using System; |
| | 5 | | using System.Collections.Generic; |
| | 6 | | using System.Linq; |
| | 7 | | using UnityEngine; |
| | 8 | | using Variables.RealmsInfo; |
| | 9 | |
|
| | 10 | | /// <summary> |
| | 11 | | /// Main controller for the feature "Explore V2". |
| | 12 | | /// </summary> |
| | 13 | | public class ExploreV2MenuComponentController : IExploreV2MenuComponentController |
| | 14 | | { |
| 135 | 15 | | internal UserProfile ownUserProfile => UserProfile.GetOwnUserProfile(); |
| 45 | 16 | | internal RectTransform topMenuTooltipReference { get => view.currentTopMenuTooltipReference; } |
| 45 | 17 | | internal RectTransform placesAndEventsTooltipReference { get => view.currentPlacesAndEventsTooltipReference; } |
| 45 | 18 | | internal RectTransform backpackTooltipReference { get => view.currentBackpackTooltipReference; } |
| 45 | 19 | | internal RectTransform mapTooltipReference { get => view.currentMapTooltipReference; } |
| 45 | 20 | | internal RectTransform builderTooltipReference { get => view.currentBuilderTooltipReference; } |
| 45 | 21 | | internal RectTransform questTooltipReference { get => view.currentQuestTooltipReference; } |
| 45 | 22 | | internal RectTransform settingsTooltipReference { get => view.currentSettingsTooltipReference; } |
| 45 | 23 | | internal RectTransform profileCardTooltipReference { get => view.currentProfileCardTooltipReference; } |
| | 24 | |
|
| | 25 | | internal IExploreV2MenuComponentView view; |
| | 26 | | internal IPlacesAndEventsSectionComponentController placesAndEventsSectionController; |
| | 27 | | internal IExploreV2Analytics exploreV2Analytics; |
| | 28 | | internal ExploreSection currentOpenSection; |
| | 29 | |
|
| 248 | 30 | | internal BaseVariable<bool> isOpen => DataStore.i.exploreV2.isOpen; |
| 135 | 31 | | internal BaseVariable<int> currentSectionIndex => DataStore.i.exploreV2.currentSectionIndex; |
| 62 | 32 | | internal BaseVariable<bool> profileCardIsOpen => DataStore.i.exploreV2.profileCardIsOpen; |
| 95 | 33 | | internal BaseVariable<bool> isInitialized => DataStore.i.exploreV2.isInitialized; |
| 197 | 34 | | internal BaseVariable<bool> placesAndEventsVisible => DataStore.i.exploreV2.placesAndEventsVisible; |
| 185 | 35 | | internal BaseVariable<bool> isAvatarEditorInitialized => DataStore.i.HUDs.isAvatarEditorInitialized; |
| 197 | 36 | | internal BaseVariable<bool> avatarEditorVisible => DataStore.i.HUDs.avatarEditorVisible; |
| 185 | 37 | | internal BaseVariable<bool> isNavmapInitialized => DataStore.i.HUDs.isNavMapInitialized; |
| 197 | 38 | | internal BaseVariable<bool> navmapVisible => DataStore.i.HUDs.navmapVisible; |
| 185 | 39 | | internal BaseVariable<bool> isBuilderInitialized => DataStore.i.builderInWorld.isInitialized; |
| 197 | 40 | | internal BaseVariable<bool> builderVisible => DataStore.i.HUDs.builderProjectsPanelVisible; |
| 185 | 41 | | internal BaseVariable<bool> isQuestInitialized => DataStore.i.Quests.isInitialized; |
| 197 | 42 | | internal BaseVariable<bool> questVisible => DataStore.i.HUDs.questsPanelVisible; |
| 185 | 43 | | internal BaseVariable<bool> isSettingsPanelInitialized => DataStore.i.settings.isInitialized; |
| 197 | 44 | | internal BaseVariable<bool> settingsVisible => DataStore.i.settings.settingsPanelVisible; |
| | 45 | |
|
| | 46 | | public void Initialize() |
| | 47 | | { |
| 45 | 48 | | exploreV2Analytics = CreateAnalyticsController(); |
| 45 | 49 | | view = CreateView(); |
| 45 | 50 | | SetVisibility(false); |
| | 51 | |
|
| 45 | 52 | | DataStore.i.realm.playerRealm.OnChange += UpdateRealmInfo; |
| 45 | 53 | | UpdateRealmInfo(DataStore.i.realm.playerRealm.Get(), null); |
| | 54 | |
|
| 45 | 55 | | ownUserProfile.OnUpdate += UpdateProfileInfo; |
| 45 | 56 | | UpdateProfileInfo(ownUserProfile); |
| 45 | 57 | | view.currentProfileCard.onClick?.AddListener(() => { profileCardIsOpen.Set(!profileCardIsOpen.Get()); }); |
| 45 | 58 | | view.OnCloseButtonPressed += OnCloseButtonPressed; |
| 45 | 59 | | view.OnAfterShowAnimation += OnAfterShowAnimation; |
| | 60 | |
|
| 45 | 61 | | DataStore.i.exploreV2.topMenuTooltipReference.Set(topMenuTooltipReference); |
| 45 | 62 | | DataStore.i.exploreV2.placesAndEventsTooltipReference.Set(placesAndEventsTooltipReference); |
| 45 | 63 | | DataStore.i.exploreV2.backpackTooltipReference.Set(backpackTooltipReference); |
| 45 | 64 | | DataStore.i.exploreV2.mapTooltipReference.Set(mapTooltipReference); |
| 45 | 65 | | DataStore.i.exploreV2.builderTooltipReference.Set(builderTooltipReference); |
| 45 | 66 | | DataStore.i.exploreV2.questTooltipReference.Set(questTooltipReference); |
| 45 | 67 | | DataStore.i.exploreV2.settingsTooltipReference.Set(settingsTooltipReference); |
| 45 | 68 | | DataStore.i.exploreV2.profileCardTooltipReference.Set(profileCardTooltipReference); |
| | 69 | |
|
| 45 | 70 | | view.OnInitialized += CreateControllers; |
| 45 | 71 | | view.OnSectionOpen += OnSectionOpen; |
| | 72 | |
|
| 45 | 73 | | isOpen.OnChange += IsOpenChanged; |
| 45 | 74 | | IsOpenChanged(isOpen.Get(), false); |
| | 75 | |
|
| 45 | 76 | | currentSectionIndex.OnChange += CurrentSectionIndexChanged; |
| 45 | 77 | | CurrentSectionIndexChanged(currentSectionIndex.Get(), 0); |
| | 78 | |
|
| 45 | 79 | | placesAndEventsVisible.OnChange += PlacesAndEventsVisibleChanged; |
| 45 | 80 | | PlacesAndEventsVisibleChanged(placesAndEventsVisible.Get(), false); |
| | 81 | |
|
| 45 | 82 | | isAvatarEditorInitialized.OnChange += IsAvatarEditorInitializedChanged; |
| 45 | 83 | | IsAvatarEditorInitializedChanged(isAvatarEditorInitialized.Get(), false); |
| 45 | 84 | | avatarEditorVisible.OnChange += AvatarEditorVisibleChanged; |
| 45 | 85 | | AvatarEditorVisibleChanged(avatarEditorVisible.Get(), false); |
| | 86 | |
|
| 45 | 87 | | isNavmapInitialized.OnChange += IsNavMapInitializedChanged; |
| 45 | 88 | | IsNavMapInitializedChanged(isNavmapInitialized.Get(), false); |
| 45 | 89 | | navmapVisible.OnChange += NavmapVisibleChanged; |
| 45 | 90 | | NavmapVisibleChanged(navmapVisible.Get(), false); |
| | 91 | |
|
| 45 | 92 | | isBuilderInitialized.OnChange += IsBuilderInitializedChanged; |
| 45 | 93 | | IsBuilderInitializedChanged(isBuilderInitialized.Get(), false); |
| 45 | 94 | | builderVisible.OnChange += BuilderVisibleChanged; |
| 45 | 95 | | BuilderVisibleChanged(builderVisible.Get(), false); |
| | 96 | |
|
| 45 | 97 | | isQuestInitialized.OnChange += IsQuestInitializedChanged; |
| 45 | 98 | | IsQuestInitializedChanged(isQuestInitialized.Get(), false); |
| 45 | 99 | | questVisible.OnChange += QuestVisibleChanged; |
| 45 | 100 | | QuestVisibleChanged(questVisible.Get(), false); |
| | 101 | |
|
| 45 | 102 | | isSettingsPanelInitialized.OnChange += IsSettingsPanelInitializedChanged; |
| 45 | 103 | | IsSettingsPanelInitializedChanged(isSettingsPanelInitialized.Get(), false); |
| 45 | 104 | | settingsVisible.OnChange += SettingsVisibleChanged; |
| 45 | 105 | | SettingsVisibleChanged(settingsVisible.Get(), false); |
| | 106 | |
|
| 45 | 107 | | isInitialized.Set(true); |
| 45 | 108 | | } |
| | 109 | |
|
| | 110 | | internal void CreateControllers() |
| | 111 | | { |
| 1 | 112 | | placesAndEventsSectionController = new PlacesAndEventsSectionComponentController(view.currentPlacesAndEventsSect |
| 1 | 113 | | placesAndEventsSectionController.OnCloseExploreV2 += OnCloseButtonPressed; |
| 1 | 114 | | } |
| | 115 | |
|
| | 116 | | internal void OnSectionOpen(ExploreSection section) |
| | 117 | | { |
| 6 | 118 | | if (section != currentOpenSection) |
| 5 | 119 | | exploreV2Analytics.SendStartMenuSectionVisibility(currentOpenSection, false); |
| | 120 | |
|
| 6 | 121 | | currentOpenSection = section; |
| | 122 | |
|
| 6 | 123 | | if (currentOpenSection == ExploreSection.Backpack) |
| | 124 | | { |
| 1 | 125 | | view.ConfigureEncapsulatedSection( |
| | 126 | | ExploreSection.Backpack, |
| | 127 | | DataStore.i.exploreV2.configureBackpackInFullscreenMenu); |
| | 128 | | } |
| | 129 | |
|
| 6 | 130 | | placesAndEventsVisible.Set(currentOpenSection == ExploreSection.Explore); |
| 6 | 131 | | avatarEditorVisible.Set(currentOpenSection == ExploreSection.Backpack); |
| 6 | 132 | | navmapVisible.Set(currentOpenSection == ExploreSection.Map); |
| 6 | 133 | | builderVisible.Set(currentOpenSection == ExploreSection.Builder); |
| 6 | 134 | | questVisible.Set(currentOpenSection == ExploreSection.Quest); |
| 6 | 135 | | settingsVisible.Set(currentOpenSection == ExploreSection.Settings); |
| 6 | 136 | | profileCardIsOpen.Set(false); |
| 6 | 137 | | } |
| | 138 | |
|
| | 139 | | public void Dispose() |
| | 140 | | { |
| 45 | 141 | | DataStore.i.realm.playerRealm.OnChange -= UpdateRealmInfo; |
| 45 | 142 | | ownUserProfile.OnUpdate -= UpdateProfileInfo; |
| 45 | 143 | | view.currentProfileCard.onClick?.RemoveAllListeners(); |
| 45 | 144 | | isOpen.OnChange -= IsOpenChanged; |
| 45 | 145 | | currentSectionIndex.OnChange -= CurrentSectionIndexChanged; |
| 45 | 146 | | placesAndEventsVisible.OnChange -= PlacesAndEventsVisibleChanged; |
| 45 | 147 | | isAvatarEditorInitialized.OnChange += IsAvatarEditorInitializedChanged; |
| 45 | 148 | | avatarEditorVisible.OnChange -= AvatarEditorVisibleChanged; |
| 45 | 149 | | isNavmapInitialized.OnChange -= IsNavMapInitializedChanged; |
| 45 | 150 | | navmapVisible.OnChange -= NavmapVisibleChanged; |
| 45 | 151 | | isBuilderInitialized.OnChange -= IsBuilderInitializedChanged; |
| 45 | 152 | | builderVisible.OnChange -= BuilderVisibleChanged; |
| 45 | 153 | | isQuestInitialized.OnChange -= IsQuestInitializedChanged; |
| 45 | 154 | | questVisible.OnChange -= QuestVisibleChanged; |
| 45 | 155 | | isSettingsPanelInitialized.OnChange -= IsSettingsPanelInitializedChanged; |
| 45 | 156 | | settingsVisible.OnChange -= SettingsVisibleChanged; |
| | 157 | |
|
| 45 | 158 | | if (view != null) |
| | 159 | | { |
| 45 | 160 | | view.OnCloseButtonPressed -= OnCloseButtonPressed; |
| 45 | 161 | | view.OnAfterShowAnimation -= OnAfterShowAnimation; |
| 45 | 162 | | view.OnInitialized -= CreateControllers; |
| 45 | 163 | | view.OnSectionOpen -= OnSectionOpen; |
| 45 | 164 | | view.Dispose(); |
| | 165 | | } |
| | 166 | |
|
| 45 | 167 | | if (placesAndEventsSectionController != null) |
| | 168 | | { |
| 1 | 169 | | placesAndEventsSectionController.OnCloseExploreV2 -= OnCloseButtonPressed; |
| 1 | 170 | | placesAndEventsSectionController.Dispose(); |
| | 171 | | } |
| 45 | 172 | | } |
| | 173 | |
|
| 218 | 174 | | public void SetVisibility(bool visible) { isOpen.Set(visible); } |
| | 175 | |
|
| 128 | 176 | | internal void IsOpenChanged(bool current, bool previous) { SetVisibility_Internal(current); } |
| | 177 | |
|
| | 178 | | internal void CurrentSectionIndexChanged(int current, int previous) |
| | 179 | | { |
| 343 | 180 | | if (DataStore.i.exploreV2.isInShowAnimationTransiton.Get()) |
| 0 | 181 | | return; |
| | 182 | |
|
| 343 | 183 | | if (Enum.IsDefined(typeof(ExploreSection), current)) |
| | 184 | | { |
| 291 | 185 | | if (!view.IsSectionActive((ExploreSection)current)) |
| 291 | 186 | | CurrentSectionIndexChanged(current + 1, current); |
| | 187 | | else |
| 0 | 188 | | view.GoToSection((ExploreSection)current); |
| 0 | 189 | | } |
| | 190 | | else |
| 52 | 191 | | view.GoToSection(0); |
| 52 | 192 | | } |
| | 193 | |
|
| | 194 | | internal void SetVisibility_Internal(bool visible) |
| | 195 | | { |
| 64 | 196 | | if (view == null) |
| 0 | 197 | | return; |
| | 198 | |
|
| 64 | 199 | | if (visible) |
| | 200 | | { |
| 15 | 201 | | Utils.UnlockCursor(); |
| | 202 | |
|
| 15 | 203 | | if (DataStore.i.common.isTutorialRunning.Get()) |
| 1 | 204 | | view.GoToSection(ExploreV2MenuComponentView.DEFAULT_SECTION); |
| 1 | 205 | | } |
| | 206 | | else |
| | 207 | | { |
| 49 | 208 | | CommonScriptableObjects.isFullscreenHUDOpen.Set(false); |
| 49 | 209 | | placesAndEventsVisible.Set(false); |
| 49 | 210 | | avatarEditorVisible.Set(false); |
| 49 | 211 | | profileCardIsOpen.Set(false); |
| 49 | 212 | | navmapVisible.Set(false); |
| 49 | 213 | | builderVisible.Set(false); |
| 49 | 214 | | questVisible.Set(false); |
| 49 | 215 | | settingsVisible.Set(false); |
| | 216 | | } |
| | 217 | |
|
| 64 | 218 | | view.SetVisible(visible); |
| 64 | 219 | | } |
| | 220 | |
|
| 0 | 221 | | internal void OnAfterShowAnimation() { CommonScriptableObjects.isFullscreenHUDOpen.Set(true); } |
| | 222 | |
|
| | 223 | | internal void PlacesAndEventsVisibleChanged(bool current, bool previous) |
| | 224 | | { |
| 48 | 225 | | if (!isInitialized.Get()) |
| 1 | 226 | | return; |
| | 227 | |
|
| 47 | 228 | | if (current) |
| | 229 | | { |
| 2 | 230 | | SetVisibility(true); |
| 2 | 231 | | view.GoToSection(ExploreSection.Explore); |
| 2 | 232 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Explore, true); |
| 2 | 233 | | } |
| 45 | 234 | | else if (currentOpenSection == ExploreSection.Explore) |
| | 235 | | { |
| 45 | 236 | | SetVisibility(false); |
| 45 | 237 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Explore, false); |
| | 238 | | } |
| 45 | 239 | | } |
| | 240 | |
|
| 112 | 241 | | internal void IsAvatarEditorInitializedChanged(bool current, bool previous) { view.SetSectionActive(ExploreSection.B |
| | 242 | |
|
| | 243 | | internal void AvatarEditorVisibleChanged(bool current, bool previous) |
| | 244 | | { |
| 48 | 245 | | if (!isAvatarEditorInitialized.Get() || DataStore.i.common.isSignUpFlow.Get()) |
| 5 | 246 | | return; |
| | 247 | |
|
| 43 | 248 | | if (current) |
| | 249 | | { |
| 2 | 250 | | SetVisibility(true); |
| 2 | 251 | | view.GoToSection(ExploreSection.Backpack); |
| 2 | 252 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Backpack, true); |
| 2 | 253 | | } |
| 41 | 254 | | else if (currentOpenSection == ExploreSection.Backpack) |
| | 255 | | { |
| 1 | 256 | | SetVisibility(false); |
| 1 | 257 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Backpack, false); |
| | 258 | | } |
| 41 | 259 | | } |
| | 260 | |
|
| | 261 | | internal void IsNavMapInitializedChanged(bool current, bool previous) |
| | 262 | | { |
| 48 | 263 | | view.SetSectionActive(ExploreSection.Map, current); |
| | 264 | |
|
| 48 | 265 | | if (current) |
| 19 | 266 | | view.ConfigureEncapsulatedSection(ExploreSection.Map, DataStore.i.exploreV2.configureMapInFullscreenMenu); |
| 48 | 267 | | } |
| | 268 | |
|
| | 269 | | internal void NavmapVisibleChanged(bool current, bool previous) |
| | 270 | | { |
| 48 | 271 | | if (!isNavmapInitialized.Get()) |
| 28 | 272 | | return; |
| | 273 | |
|
| 20 | 274 | | if (current) |
| | 275 | | { |
| 2 | 276 | | SetVisibility(true); |
| 2 | 277 | | view.GoToSection(ExploreSection.Map); |
| 2 | 278 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Map, true); |
| 2 | 279 | | } |
| 18 | 280 | | else if (currentOpenSection == ExploreSection.Map) |
| | 281 | | { |
| 1 | 282 | | SetVisibility(false); |
| 1 | 283 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Map, false); |
| | 284 | | } |
| 18 | 285 | | } |
| | 286 | |
|
| | 287 | | internal void IsBuilderInitializedChanged(bool current, bool previous) |
| | 288 | | { |
| 48 | 289 | | view.SetSectionActive(ExploreSection.Builder, current); |
| | 290 | |
|
| 48 | 291 | | if (current) |
| 40 | 292 | | view.ConfigureEncapsulatedSection(ExploreSection.Builder, DataStore.i.exploreV2.configureBuilderInFullscreen |
| 48 | 293 | | } |
| | 294 | |
|
| | 295 | | internal void BuilderVisibleChanged(bool current, bool previous) |
| | 296 | | { |
| 48 | 297 | | if (!isBuilderInitialized.Get()) |
| 7 | 298 | | return; |
| | 299 | |
|
| 41 | 300 | | if (current) |
| | 301 | | { |
| 2 | 302 | | SetVisibility(true); |
| 2 | 303 | | view.GoToSection(ExploreSection.Builder); |
| 2 | 304 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Builder, true); |
| 2 | 305 | | } |
| 39 | 306 | | else if (currentOpenSection == ExploreSection.Builder) |
| | 307 | | { |
| 1 | 308 | | SetVisibility(false); |
| 1 | 309 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Builder, false); |
| | 310 | | } |
| 39 | 311 | | } |
| | 312 | |
|
| | 313 | | internal void IsQuestInitializedChanged(bool current, bool previous) |
| | 314 | | { |
| 48 | 315 | | view.SetSectionActive(ExploreSection.Quest, current); |
| | 316 | |
|
| 48 | 317 | | if (current) |
| 9 | 318 | | view.ConfigureEncapsulatedSection(ExploreSection.Quest, DataStore.i.exploreV2.configureQuestInFullscreenMenu |
| 48 | 319 | | } |
| | 320 | |
|
| | 321 | | internal void QuestVisibleChanged(bool current, bool previous) |
| | 322 | | { |
| 48 | 323 | | if (!isQuestInitialized.Get()) |
| 39 | 324 | | return; |
| | 325 | |
|
| 9 | 326 | | if (current) |
| | 327 | | { |
| 1 | 328 | | SetVisibility(true); |
| 1 | 329 | | view.GoToSection(ExploreSection.Quest); |
| 1 | 330 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Quest, true); |
| 1 | 331 | | } |
| 8 | 332 | | else if (currentOpenSection == ExploreSection.Quest) |
| | 333 | | { |
| 1 | 334 | | SetVisibility(false); |
| 1 | 335 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Quest, false); |
| | 336 | | } |
| 8 | 337 | | } |
| | 338 | |
|
| | 339 | | internal void IsSettingsPanelInitializedChanged(bool current, bool previous) |
| | 340 | | { |
| 48 | 341 | | view.SetSectionActive(ExploreSection.Settings, current); |
| | 342 | |
|
| 48 | 343 | | if (current) |
| 7 | 344 | | view.ConfigureEncapsulatedSection(ExploreSection.Settings, DataStore.i.exploreV2.configureSettingsInFullscre |
| 48 | 345 | | } |
| | 346 | |
|
| | 347 | | internal void SettingsVisibleChanged(bool current, bool previous) |
| | 348 | | { |
| 48 | 349 | | if (!isSettingsPanelInitialized.Get()) |
| 41 | 350 | | return; |
| | 351 | |
|
| 7 | 352 | | if (current) |
| | 353 | | { |
| 1 | 354 | | SetVisibility(true); |
| 1 | 355 | | view.GoToSection(ExploreSection.Settings); |
| 1 | 356 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Settings, true); |
| 1 | 357 | | } |
| 6 | 358 | | else if (currentOpenSection == ExploreSection.Settings) |
| | 359 | | { |
| 1 | 360 | | SetVisibility(false); |
| 1 | 361 | | exploreV2Analytics.SendStartMenuSectionVisibility(ExploreSection.Settings, false); |
| | 362 | | } |
| 6 | 363 | | } |
| | 364 | |
|
| | 365 | | internal void UpdateRealmInfo(CurrentRealmModel currentRealm, CurrentRealmModel previousRealm) |
| | 366 | | { |
| | 367 | | // Get the name of the current realm |
| 47 | 368 | | string currentRealmServer = currentRealm?.serverName; |
| 47 | 369 | | string currentRealmLayer = currentRealm?.layer; |
| 47 | 370 | | string formattedRealmName = currentRealmServer; |
| 47 | 371 | | if (!string.IsNullOrEmpty(currentRealmLayer)) |
| | 372 | | { |
| 2 | 373 | | formattedRealmName = $"{formattedRealmName}-{currentRealmLayer}"; |
| | 374 | | } |
| | 375 | |
|
| 47 | 376 | | view.currentRealmViewer.SetRealm(formattedRealmName); |
| | 377 | |
|
| | 378 | | // Calculate number of users in the current realm |
| 47 | 379 | | List<RealmModel> realmList = DataStore.i.realm.realmsInfo.Get()?.ToList(); |
| 48 | 380 | | RealmModel currentRealmModel = realmList?.FirstOrDefault(r => r.serverName == currentRealmServer && (r.layer == |
| 47 | 381 | | int realmUsers = 0; |
| 47 | 382 | | if (currentRealmModel != null) |
| 1 | 383 | | realmUsers = currentRealmModel.usersCount; |
| | 384 | |
|
| 47 | 385 | | view.currentRealmViewer.SetNumberOfUsers(realmUsers); |
| 47 | 386 | | } |
| | 387 | |
|
| | 388 | | internal void UpdateProfileInfo(UserProfile profile) |
| | 389 | | { |
| 46 | 390 | | view.currentProfileCard.SetProfileName(profile.userName); |
| 46 | 391 | | view.currentProfileCard.SetProfileAddress(profile.ethAddress); |
| 46 | 392 | | view.currentProfileCard.SetProfilePicture(profile.face128SnapshotURL); |
| 46 | 393 | | } |
| | 394 | |
|
| | 395 | | internal void OnCloseButtonPressed(bool fromShortcut) |
| | 396 | | { |
| 2 | 397 | | if (isOpen.Get()) |
| 2 | 398 | | exploreV2Analytics.SendStartMenuVisibility(false, fromShortcut ? ExploreUIVisibilityMethod.FromShortcut : Ex |
| | 399 | |
|
| 2 | 400 | | SetVisibility(false); |
| 2 | 401 | | } |
| | 402 | |
|
| 0 | 403 | | internal virtual IExploreV2Analytics CreateAnalyticsController() => new ExploreV2Analytics.ExploreV2Analytics(); |
| | 404 | |
|
| 0 | 405 | | internal virtual IExploreV2MenuComponentView CreateView() => ExploreV2MenuComponentView.Create(); |
| | 406 | | } |