mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 01:31:02 +00:00
Renaming
This commit is contained in:
parent
745a420c19
commit
cf342bf3ae
7 changed files with 9 additions and 9 deletions
|
@ -124,7 +124,7 @@ public extension ContentDatabase {
|
|||
.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
func setLists(_ lists: [MastodonList]) -> AnyPublisher<Never, Error> {
|
||||
func setLists(_ lists: [List]) -> AnyPublisher<Never, Error> {
|
||||
databaseQueue.writePublisher {
|
||||
for list in lists {
|
||||
try Timeline.list(list).save($0)
|
||||
|
@ -139,7 +139,7 @@ public extension ContentDatabase {
|
|||
.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
func createList(_ list: MastodonList) -> AnyPublisher<Never, Error> {
|
||||
func createList(_ list: List) -> AnyPublisher<Never, Error> {
|
||||
databaseQueue.writePublisher(updates: Timeline.list(list).save)
|
||||
.ignoreOutput()
|
||||
.eraseToAnyPublisher()
|
||||
|
|
|
@ -18,7 +18,7 @@ extension Timeline: FetchableRecord, PersistableRecord {
|
|||
case (Timeline.federated.id, _):
|
||||
self = .federated
|
||||
case (let id, .some(let title)):
|
||||
self = .list(MastodonList(id: id, title: title))
|
||||
self = .list(List(id: id, title: title))
|
||||
default:
|
||||
var tag: String = row[Columns.id]
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import Foundation
|
||||
|
||||
public struct MastodonList: Codable, Hashable, Identifiable {
|
||||
public struct List: Codable, Hashable, Identifiable {
|
||||
public let id: String
|
||||
public let title: String
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ public enum Timeline: Hashable {
|
|||
case home
|
||||
case local
|
||||
case federated
|
||||
case list(MastodonList)
|
||||
case list(List)
|
||||
case tag(String)
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ public enum ListEndpoint {
|
|||
}
|
||||
|
||||
extension ListEndpoint: Endpoint {
|
||||
public typealias ResultType = MastodonList
|
||||
public typealias ResultType = List
|
||||
|
||||
public var context: [String] {
|
||||
defaultContext + ["lists"]
|
||||
|
|
|
@ -9,7 +9,7 @@ public enum ListsEndpoint {
|
|||
}
|
||||
|
||||
extension ListsEndpoint: Endpoint {
|
||||
public typealias ResultType = [MastodonList]
|
||||
public typealias ResultType = [List]
|
||||
|
||||
public var pathComponentsInContext: [String] {
|
||||
["lists"]
|
||||
|
|
|
@ -6,7 +6,7 @@ import Mastodon
|
|||
import ServiceLayer
|
||||
|
||||
public final class ListsViewModel: ObservableObject {
|
||||
@Published public private(set) var lists = [MastodonList]()
|
||||
@Published public private(set) var lists = [List]()
|
||||
@Published public private(set) var creatingList = false
|
||||
@Published public var alertItem: AlertItem?
|
||||
|
||||
|
@ -47,7 +47,7 @@ public extension ListsViewModel {
|
|||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
func delete(list: MastodonList) {
|
||||
func delete(list: List) {
|
||||
identification.service.deleteList(id: list.id)
|
||||
.assignErrorsToAlertItem(to: \.alertItem, on: self)
|
||||
.sink { _ in }
|
||||
|
|
Loading…
Reference in a new issue