Last active
July 29, 2022 10:32
-
-
Save alicanbatur/45d19417ca71e58d3c8d00f9d0ee7f4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Status.swift | |
// LiveActivity | |
// | |
// Created by Ali Can Batur on 29.07.2022. | |
// | |
import Foundation | |
enum Status: Codable { | |
case pending | |
case inProgress | |
case succeed | |
case failed | |
var isDone: Bool { | |
return self == .failed || self == .succeed | |
} | |
var title: String { | |
switch self { | |
case .pending: | |
return "Pending" | |
case .inProgress: | |
return "In Progress" | |
case .succeed: | |
return "Succeed" | |
case .failed: | |
return "Failed" | |
} | |
} | |
var icon: String { | |
switch self { | |
case .pending: | |
return "pending" | |
case .inProgress: | |
return "in-progress" | |
case .succeed: | |
return "succeed" | |
case .failed: | |
return "failed" | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment