mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 00:01:00 +00:00
Fix tag id issues
This commit is contained in:
parent
2923aa3f3c
commit
1c6a2bcff4
3 changed files with 7 additions and 3 deletions
|
@ -88,7 +88,8 @@ public extension ContentDatabase {
|
|||
}
|
||||
|
||||
try Timeline
|
||||
.filter(!(Timeline.authenticatedDefaults.map(\.id) + lists.map(\.id)).contains(Column("id")))
|
||||
.filter(!(Timeline.authenticatedDefaults.map(\.id) + lists.map(\.id)).contains(Column("id"))
|
||||
&& Column("listTitle") != nil)
|
||||
.deleteAll($0)
|
||||
}
|
||||
.ignoreOutput()
|
||||
|
|
|
@ -20,7 +20,10 @@ extension Timeline: FetchableRecord, PersistableRecord {
|
|||
case (let id, .some(let title)):
|
||||
self = .list(MastodonList(id: id, title: title))
|
||||
default:
|
||||
self = .tag(row[Columns.id])
|
||||
var tag: String = row[Columns.id]
|
||||
|
||||
tag.removeFirst()
|
||||
self = .tag(tag)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ extension Timeline: Identifiable {
|
|||
case let .list(list):
|
||||
return list.id
|
||||
case let .tag(tag):
|
||||
return "#" + tag
|
||||
return "#".appending(tag).lowercased()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue