MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / ApplyMode

Method ApplyMode

ui/MainWindow.xaml.cs:66–87  ·  view source on GitHub ↗
(string? mode, string? clientType = null)

Source from the content-addressed store, hash-verified

64 }
65
66 public void ApplyMode(string? mode, string? clientType = null)
67 {
68 // If clientType not provided, read it fresh from disk.
69 clientType ??= ReadClientType();
70
71 var cloudOnly = mode == "cloud_redirect";
72 var isThirdParty = clientType == "thirdparty";
73 var vis = cloudOnly ? Visibility.Visible : Visibility.Collapsed;
74 NavCloudProvider.Visibility = vis;
75 NavApps.Visibility = vis;
76 NavCleanup.Visibility = vis;
77 NavCloud760.Visibility = vis;
78
79 // Manifest pinning is ST-specific.
80 NavManifestPinning.Visibility = isThirdParty ? Visibility.Collapsed : Visibility.Visible;
81
82 // In cloud_redirect the mode chooser is hidden from the sidebar; the
83 // switch-back lives under Settings. In STFixer it stays visible.
84 NavChoiceMode.Visibility = cloudOnly ? Visibility.Collapsed : Visibility.Visible;
85
86 RootNavigation.UpdateLayout();
87 }
88
89 /// <summary>True on first run of a new release version; writes a .news-seen marker.</summary>
90 private static bool ShouldShowNews()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected