Skip to content

Commit d4d6991

Browse files
committed
Cleaned up code in MainPage
1 parent 68b6a2e commit d4d6991

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

Files/Views/MainPage.xaml.cs

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -179,65 +179,6 @@ public static async Task AddNewTab(Type t, string path, int atIndex = -1)
179179

180180
if (path != null)
181181
{
182-
if (path == "Settings")
183-
{
184-
tabLocationHeader = "SidebarSettings/Text".GetLocalized();
185-
fontIconSource.Glyph = "\xeb5d";
186-
}
187-
else if (path.Equals(App.AppSettings.DesktopPath, StringComparison.OrdinalIgnoreCase))
188-
{
189-
tabLocationHeader = "SidebarDesktop".GetLocalized();
190-
fontIconSource.Glyph = "\xe9f1";
191-
}
192-
else if (path.Equals(App.AppSettings.DownloadsPath, StringComparison.OrdinalIgnoreCase))
193-
{
194-
tabLocationHeader = "SidebarDownloads".GetLocalized();
195-
fontIconSource.Glyph = "\xe91c";
196-
}
197-
else if (path.Equals(App.AppSettings.DocumentsPath, StringComparison.OrdinalIgnoreCase))
198-
{
199-
tabLocationHeader = "SidebarDocuments".GetLocalized();
200-
fontIconSource.Glyph = "\xEA11";
201-
}
202-
else if (path.Equals(App.AppSettings.PicturesPath, StringComparison.OrdinalIgnoreCase))
203-
{
204-
tabLocationHeader = "SidebarPictures".GetLocalized();
205-
fontIconSource.Glyph = "\xEA83";
206-
}
207-
else if (path.Equals(App.AppSettings.MusicPath, StringComparison.OrdinalIgnoreCase))
208-
{
209-
tabLocationHeader = "SidebarMusic".GetLocalized();
210-
fontIconSource.Glyph = "\xead4";
211-
}
212-
else if (path.Equals(App.AppSettings.VideosPath, StringComparison.OrdinalIgnoreCase))
213-
{
214-
tabLocationHeader = "SidebarVideos".GetLocalized();
215-
fontIconSource.Glyph = "\xec0d";
216-
}
217-
else if (path.Equals(App.AppSettings.RecycleBinPath, StringComparison.OrdinalIgnoreCase))
218-
{
219-
var localSettings = ApplicationData.Current.LocalSettings;
220-
tabLocationHeader = localSettings.Values.Get("RecycleBin_Title", "Recycle Bin");
221-
fontIconSource.FontFamily = Application.Current.Resources["RecycleBinIcons"] as FontFamily;
222-
fontIconSource.Glyph = "\xEF87";
223-
}
224-
else if (App.AppSettings.OneDrivePath != null && path.Equals(App.AppSettings.OneDrivePath, StringComparison.OrdinalIgnoreCase))
225-
{
226-
tabLocationHeader = "OneDrive";
227-
fontIconSource.Glyph = "\xe9b7";
228-
}
229-
else if (App.AppSettings.OneDriveCommercialPath != null && path.Equals(App.AppSettings.OneDriveCommercialPath, StringComparison.OrdinalIgnoreCase))
230-
{
231-
tabLocationHeader = "OneDrive Commercial";
232-
fontIconSource.Glyph = "\xe9b7";
233-
}
234-
else if (path == "NewTab".GetLocalized())
235-
{
236-
tabLocationHeader = path;
237-
fontIconSource.Glyph = "\xe90c";
238-
}
239-
else
240-
{
241182
var isRoot = Path.GetPathRoot(path) == path;
242183

243184
if (Path.IsPathRooted(path) || isRoot) // Or is a directory or a root (drive)
@@ -280,7 +221,6 @@ public static async Task AddNewTab(Type t, string path, int atIndex = -1)
280221
tabLocationHeader = "NewTab".GetLocalized();
281222
fontIconSource.Glyph = "\xe90c";
282223
}
283-
}
284224
}
285225

286226
TabItem tvi = new TabItem()

0 commit comments

Comments
 (0)