[Android] 1.9.2
All checks were successful
OpenClimb Docker Deploy / build-and-push (push) Successful in 2m29s
All checks were successful
OpenClimb Docker Deploy / build-and-push (push) Successful in 2m29s
This commit is contained in:
@@ -80,8 +80,7 @@ struct DataManagementSection: View {
|
||||
@Binding var activeSheet: SheetType?
|
||||
@State private var showingResetAlert = false
|
||||
@State private var isExporting = false
|
||||
@State private var isMigrating = false
|
||||
@State private var showingMigrationAlert = false
|
||||
|
||||
@State private var isDeletingImages = false
|
||||
@State private var showingDeleteImagesAlert = false
|
||||
|
||||
@@ -121,27 +120,6 @@ struct DataManagementSection: View {
|
||||
}
|
||||
.foregroundColor(.primary)
|
||||
|
||||
// Migrate Image Names
|
||||
Button(action: {
|
||||
showingMigrationAlert = true
|
||||
}) {
|
||||
HStack {
|
||||
if isMigrating {
|
||||
ProgressView()
|
||||
.scaleEffect(0.8)
|
||||
Text("Migrating Images...")
|
||||
.foregroundColor(.secondary)
|
||||
} else {
|
||||
Image(systemName: "photo.badge.arrow.down")
|
||||
.foregroundColor(.orange)
|
||||
Text("Fix Image Names")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
.disabled(isMigrating)
|
||||
.foregroundColor(.primary)
|
||||
|
||||
// Delete All Images
|
||||
Button(action: {
|
||||
showingDeleteImagesAlert = true
|
||||
@@ -186,16 +164,7 @@ struct DataManagementSection: View {
|
||||
"Are you sure you want to reset all data? This will permanently delete:\n\n• All gyms and their information\n• All problems and their images\n• All climbing sessions\n• All attempts and progress data\n\nThis action cannot be undone. Consider exporting your data first."
|
||||
)
|
||||
}
|
||||
.alert("Fix Image Names", isPresented: $showingMigrationAlert) {
|
||||
Button("Cancel", role: .cancel) {}
|
||||
Button("Fix Names") {
|
||||
migrateImageNames()
|
||||
}
|
||||
} message: {
|
||||
Text(
|
||||
"This will rename all existing image files to use a consistent naming system across devices.\n\nThis improves sync reliability between iOS and Android. Your images will not be lost, only renamed.\n\nThis is safe to run multiple times."
|
||||
)
|
||||
}
|
||||
|
||||
.alert("Delete All Images", isPresented: $showingDeleteImagesAlert) {
|
||||
Button("Cancel", role: .cancel) {}
|
||||
Button("Delete", role: .destructive) {
|
||||
@@ -219,17 +188,6 @@ struct DataManagementSection: View {
|
||||
}
|
||||
}
|
||||
|
||||
private func migrateImageNames() {
|
||||
isMigrating = true
|
||||
Task {
|
||||
await MainActor.run {
|
||||
ImageManager.shared.migrateImageNamesToDeterministic(dataManager: dataManager)
|
||||
isMigrating = false
|
||||
dataManager.successMessage = "Image names fixed successfully!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func deleteAllImages() {
|
||||
isDeletingImages = true
|
||||
Task {
|
||||
|
||||
Reference in New Issue
Block a user