2022-01-27 14:23:39 +01:00
|
|
|
//
|
|
|
|
// DataSourceFacade+Model.swift
|
|
|
|
// Mastodon
|
|
|
|
//
|
|
|
|
// Created by MainasuK on 2022-1-13.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import CoreData
|
|
|
|
import CoreDataStack
|
2022-01-28 05:09:28 +01:00
|
|
|
import MastodonUI
|
2023-11-22 12:32:04 +01:00
|
|
|
import MastodonSDK
|
2022-01-27 14:23:39 +01:00
|
|
|
|
|
|
|
extension DataSourceFacade {
|
|
|
|
static func status(
|
2023-11-22 12:32:04 +01:00
|
|
|
status: MastodonStatus,
|
2022-01-27 14:23:39 +01:00
|
|
|
target: StatusTarget
|
2023-12-13 15:09:37 +01:00
|
|
|
) -> MastodonStatus {
|
2023-11-22 12:32:04 +01:00
|
|
|
switch target {
|
|
|
|
case .status:
|
|
|
|
return status.reblog ?? status
|
|
|
|
case .reblog:
|
|
|
|
return status
|
2022-01-27 14:23:39 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|