From 5d7bc809cbb504017da7de1428434d0bfe7d95a3 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 19 Nov 2022 12:54:37 +0100 Subject: [PATCH] Fix browser settings labels --- Shared/Settings/BrowsingSettings.swift | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/Shared/Settings/BrowsingSettings.swift b/Shared/Settings/BrowsingSettings.swift index 2b1fdcd0..819b02b2 100644 --- a/Shared/Settings/BrowsingSettings.swift +++ b/Shared/Settings/BrowsingSettings.swift @@ -82,26 +82,12 @@ struct BrowsingSettings: View { } #endif Toggle("Show Open Videos quick actions", isOn: $showOpenActionsInHome) - HStack { - Text("Recent History") - TextField("Recent History", text: $homeHistoryItemsText) - .labelsHidden() - #if !os(macOS) - .keyboardType(.numberPad) - #endif - .onAppear { - homeHistoryItemsText = String(homeHistoryItems) - } - .onChange(of: homeHistoryItemsText) { newValue in - homeHistoryItems = Int(newValue) ?? 10 - } - } - .multilineTextAlignment(.trailing) #if os(iOS) HStack { Text("Recent Documents") TextField("Recent Documents", text: $homeRecentDocumentsItemsText) + .multilineTextAlignment(.trailing) .labelsHidden() #if !os(macOS) .keyboardType(.numberPad) @@ -113,9 +99,24 @@ struct BrowsingSettings: View { homeRecentDocumentsItems = Int(newValue) ?? 3 } } - .multilineTextAlignment(.trailing) #endif + HStack { + Text("Recent History") + TextField("Recent History", text: $homeHistoryItemsText) + .multilineTextAlignment(.trailing) + .labelsHidden() + #if !os(macOS) + .keyboardType(.numberPad) + #endif + .onAppear { + homeHistoryItemsText = String(homeHistoryItems) + } + .onChange(of: homeHistoryItemsText) { newValue in + homeHistoryItems = Int(newValue) ?? 10 + } + } + if !accounts.isEmpty { Toggle("Show Favorites", isOn: $showFavoritesInHome)