From fd9e68513d614f2f5e1cce0186f5603c1c814ec2 Mon Sep 17 00:00:00 2001 From: cranci1 <100066266+cranci1@users.noreply.github.com> Date: Tue, 10 Jun 2025 20:36:42 +0200 Subject: [PATCH] ops --- .../SettingsSubViews/SettingsViewData.swift | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewData.swift b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewData.swift index 99bd701..efffd95 100644 --- a/Sora/Views/SettingsView/SettingsSubViews/SettingsViewData.swift +++ b/Sora/Views/SettingsView/SettingsSubViews/SettingsViewData.swift @@ -157,33 +157,15 @@ struct SettingsViewData: View { footer: "The app cache allow the app to sho immages faster.\n\nClearing the documents folder will remove all the modules.\n\nThe App Data should never be erased if you don't know what that will cause." ) { VStack(spacing: 0) { - HStack { - Button(action: { + SettingsButtonRow( + icon: "trash", + title: "Remove All Cache", + subtitle: cacheSizeText, + action: { activeAlert = .clearCache showAlert = true - }) { - HStack { - Image(systemName: "trash") - .frame(width: 24, height: 24) - .foregroundStyle(.red) - - Text("Remove All Caches") - .foregroundStyle(.red) - - Spacer() - } - .padding(.horizontal, 16) - .padding(.vertical, 12) } - .buttonStyle(PlainButtonStyle()) - - Text(cacheSizeText) - .foregroundStyle(.gray) - } - .padding(.horizontal, 16) - .padding(.vertical, 12) - - Divider().padding(.horizontal, 16) + ) SettingsButtonRow( icon: "film",