Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
fix: build problems
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseMonteiro committed May 30, 2024
1 parent 2b79f27 commit 24bae40
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion TikiClient/Classes/TikiClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public class TikiClient {
}

public static func createOffer(_id: String?, ptr: String?, description: String?, terms: String?, reward: [Reward], use: Use, tags: [Tag], permissions: [Permission?]){
self.offer = Offer(_id: _id, ptr: ptr, description: description, terms: terms, reward: reward, use: use, tags: tags, permissions: permissions)
self.offer = Offer(_id: _id, ptr: ptr, description: description, terms: terms, reward: reward, use: use, tags: tags, permissions: permissions, mutable: true)
}
public static func acceptOffer(completion: @escaping (String?) -> Void, onError: @escaping (String) -> Void){
if(offer == nil){
Expand Down
4 changes: 3 additions & 1 deletion TikiClient/Classes/UI/Offer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ public class Offer {
public var use: Use
public var tags = [Tag]()
public var permissions = [Permission?]()
public var mutable: Bool


public init(_id: String? = nil, ptr: String? = nil, description: String? = nil, terms: String? = nil, reward: [Reward] = [Reward](), use: Use, tags: [Tag] = [Tag](), permissions: [Permission?] = [Permission?]()) {
public init(_id: String? = nil, ptr: String? = nil, description: String? = nil, terms: String? = nil, reward: [Reward] = [Reward](), use: Use, tags: [Tag] = [Tag](), permissions: [Permission?] = [Permission?](), mutable: Bool) {
self._id = _id
self.ptr = ptr
self.description = description
Expand All @@ -47,6 +48,7 @@ public class Offer {
self.use = use
self.tags = tags
self.permissions = permissions
self.mutable = mutable
}

/// The Offer unique identifier. If none is set, it creates a random UUID.
Expand Down
12 changes: 4 additions & 8 deletions TikiClient/Classes/UI/OfferFlow.swift
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import SwiftUI

public struct OfferFlow: View{
@ObservedObject public static var step = OfferStepFollow(offerFollowSteps: .none)
@ObservedObject public static var step = OfferStepFollow(offerFollowSteps: .permissions)
public init() {}

public var body: some View{
switch(OfferFlow.step.offerFollowSteps){
case .none:
case .permissions:
OfferAllowTrackView()
case .allowTrackAsk:
OfferAllowTrackView()
case .linkCard:
case .offers:
OfferLinkCardView()
case .deniedLinkCard:
case .settings:
OfferLinkCardView()
case .deniedTrack:
OfferAllowTrackView()
}
}

Expand Down
6 changes: 3 additions & 3 deletions TikiClient/Classes/UI/Screens/OfferAllowTraking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ public struct OfferAllowTrackView: View {
case .restricted:
print("restricted")
case .denied:
OfferFlow.step.offerFollowSteps = .allowTrackAsk
OfferFlow.step.offerFollowSteps = .permissions
case .authorized:
OfferFlow.step.offerFollowSteps = .linkCard
OfferFlow.step.offerFollowSteps = .offers
default:
OfferFlow.step.offerFollowSteps = .allowTrackAsk
OfferFlow.step.offerFollowSteps = .permissions
}
})
} label: {
Expand Down

0 comments on commit 24bae40

Please sign in to comment.