Преглед на файлове

Update Settings sidebar subtitle to match the settings screen.

Hide sidebar row subtitles when empty so title-only items stay compact.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 преди 1 месец
родител
ревизия
9f47e2001f
променени са 2 файла, в които са добавени 6 реда и са изтрити 4 реда
  1. 1 1
      Reddit App/ViewModels/FrontPageViewModel.swift
  2. 5 3
      Reddit App/Views/Components/SidebarNavItemView.swift

+ 1 - 1
Reddit App/ViewModels/FrontPageViewModel.swift

@@ -14,7 +14,7 @@ final class FrontPageViewModel {
 
     static let settingsItem = SidebarNavItem(
         title: "Settings",
-        subtitle: "Preferences & API keys",
+        subtitle: "Manage app preferences",
         iconKind: .settings
     )
 

+ 5 - 3
Reddit App/Views/Components/SidebarNavItemView.swift

@@ -58,9 +58,11 @@ private struct SidebarItemRow<Icon: View>: View {
                 Text(title)
                     .font(.system(size: 12, weight: .semibold))
                     .foregroundStyle(AppTheme.textPrimary)
-                Text(subtitle)
-                    .font(.system(size: 10))
-                    .foregroundStyle(AppTheme.textSecondary)
+                if !subtitle.isEmpty {
+                    Text(subtitle)
+                        .font(.system(size: 10))
+                        .foregroundStyle(AppTheme.textSecondary)
+                }
             }
             .padding(.leading, 2)