Skip to content

Instantly share code, notes, and snippets.

@alicanbatur
Last active July 29, 2022 10:32
Show Gist options
  • Save alicanbatur/45d19417ca71e58d3c8d00f9d0ee7f4d to your computer and use it in GitHub Desktop.
Save alicanbatur/45d19417ca71e58d3c8d00f9d0ee7f4d to your computer and use it in GitHub Desktop.
//
// 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