Procházet zdrojové kódy

Fix sidebar showing Open Reddit as selected alongside other items.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 před 1 měsícem
rodič
revize
2ad2183c4a
1 změnil soubory, kde provedl 2 přidání a 13 odebrání
  1. 2 13
      Reddit App/Utilities/InteractiveHoverStyle.swift

+ 2 - 13
Reddit App/Utilities/InteractiveHoverStyle.swift

@@ -172,24 +172,13 @@ private struct SidebarRowHoverModifier: ViewModifier {
 
     @ViewBuilder
     private var sidebarRowBackground: some View {
-        if showsCardBackground {
+        if showsCardBackground && isSelected {
             RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
                 .fill(AppTheme.quickAccessBackground)
                 .overlay(
                     RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
-                        .stroke(
-                            isSelected
-                                ? selectedBorderColor
-                                : (isHovered ? AppTheme.hoverBorder : AppTheme.cardBorder),
-                            lineWidth: 1
-                        )
+                        .stroke(selectedBorderColor, lineWidth: 1)
                 )
-                .overlay {
-                    if isHovered && !isSelected {
-                        RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
-                            .fill(AppTheme.hoverFill)
-                    }
-                }
         } else if isSelected {
             RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
                 .fill(AppTheme.selectedRowFill)