Refactoring

This commit is contained in:
Justin Mazzocchi 2020-09-28 12:36:19 -07:00
parent 7bf3e2eb3f
commit 2f42a73b9a
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C

View file

@ -397,11 +397,11 @@ private extension ContentDatabase {
func clean() { func clean() {
databaseWriter.asyncWrite { databaseWriter.asyncWrite {
try TimelineStatusJoin.filter(Column("id") != Timeline.home.id).deleteAll($0) try TimelineStatusJoin.filter(Column("timelineId") != Timeline.home.id).deleteAll($0)
try StatusContextJoin.deleteAll($0)
try AccountPinnedStatusJoin.deleteAll($0)
try AccountStatusJoin.deleteAll($0)
} completion: { _, _ in } } completion: { _, _ in }
databaseWriter.asyncWrite { try StatusContextJoin.deleteAll($0) } completion: { _, _ in }
databaseWriter.asyncWrite { try AccountPinnedStatusJoin.deleteAll($0) } completion: { _, _ in }
databaseWriter.asyncWrite { try AccountStatusJoin.deleteAll($0) } completion: { _, _ in }
} }
} }
// swiftlint:enable file_length // swiftlint:enable file_length