From 622c3b0240ea678679175e73068dd8e0fc5f455c Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 8 Sep 2021 20:02:38 -0500 Subject: [PATCH] Sort the theme names --- Shared/ArticleStyles/ArticleThemesManager.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shared/ArticleStyles/ArticleThemesManager.swift b/Shared/ArticleStyles/ArticleThemesManager.swift index 8ca749812..54138cbbe 100644 --- a/Shared/ArticleStyles/ArticleThemesManager.swift +++ b/Shared/ArticleStyles/ArticleThemesManager.swift @@ -100,9 +100,9 @@ private extension ArticleThemesManager { func updateThemeNames() { let updatedThemeNames = allThemePaths(folderPath).map { ArticleTheme.themeNameForPath($0) } - - if updatedThemeNames != themeNames { - themeNames = updatedThemeNames + let sortedThemeNames = updatedThemeNames.sorted(by: { $0.compare($1, options: .caseInsensitive) == .orderedAscending }) + if sortedThemeNames != themeNames { + themeNames = sortedThemeNames } }