Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Uplift.xcodeproj/xcshareddata/xcschemes/Uplift.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand Down
21 changes: 1 addition & 20 deletions Uplift/Utils/Custom/CustomLoadingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import SwiftUI

struct CustomLoadingView: View {

@State private var isAnimating = false
@State private var rotation: Double = 0

Expand All @@ -31,26 +32,6 @@ struct CustomLoadingView: View {
}
}
}

private var loadingView: some View {
ZStack {
pulsingBackground

VStack(spacing: 30) {
spinningLogoView
loadingText
}
}
.onAppear {
isAnimating = true
withAnimation(
Animation.linear(duration: 2.5)
.repeatForever(autoreverses: false)
) {
rotation = 360
}
}
}

private var pulsingBackground: some View {
RoundedRectangle(cornerRadius: 20)
Expand Down
13 changes: 9 additions & 4 deletions Uplift/ViewModels/CapacityRemindersViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,11 @@ extension CapacityRemindersView {
}
.sink { completion in
if case let .failure(error) = completion {
self.cleanupLocalReminderData()
self.isLoading = false
self.creatingReminder = false
Logger.data.critical("Error in creating capacity reminder: \(error)")
}
self.creatingReminder = false
} receiveValue: { [weak self] reminderId in
guard let self, let id = reminderId else { return }

Expand Down Expand Up @@ -260,10 +262,11 @@ extension CapacityRemindersView {
}
.sink { completion in
if case let .failure(error) = completion {
self.cleanupLocalReminderData()
self.isLoading = false
self.editingReminder = false
Logger.data.critical("Error in editing capacity reminder: \(error)")
}

self.editingReminder = false
} receiveValue: { [weak self] reminderId in
guard let self, let id = reminderId else { return }

Expand Down Expand Up @@ -303,9 +306,11 @@ extension CapacityRemindersView {
}
.sink { completion in
if case let .failure(error) = completion {
self.cleanupLocalReminderData()
self.isLoading = false
self.deletingReminder = false
Logger.data.critical("Error in deleting capacity reminder: \(error)")
}
self.deletingReminder = false
} receiveValue: { [weak self] reminderId in
guard let self, let id = reminderId else { return }

Expand Down
6 changes: 5 additions & 1 deletion Uplift/Views/Profile/CapacityRemindersView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,14 @@ struct CapacityRemindersView: View {
.padding(.vertical, 12)

Slider(
value: $viewModel.capacityThreshold,
value: Binding(
get: { viewModel.capacityThreshold },
set: { viewModel.capacityThreshold = min($0, 90) }
),
in: 0...100,
step: 10
)

.tint(Constants.Colors.yellow)
.frame(height: 8)
.onChange(of: viewModel.capacityThreshold) { _ in
Expand Down