mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Refactors SourceViewController into dedicated tab
* Updates UI to use source icons + tint colors * Adds Edit button + swipe actions
This commit is contained in:
@@ -386,6 +386,13 @@ public extension Source
|
||||
}
|
||||
return isRecommended
|
||||
}
|
||||
|
||||
var lastUpdatedDate: Date? {
|
||||
let allDates = self.apps.compactMap { $0.latestAvailableVersion?.date } + self.newsItems.map { $0.date }
|
||||
|
||||
let lastUpdatedDate = allDates.sorted().last
|
||||
return lastUpdatedDate
|
||||
}
|
||||
}
|
||||
|
||||
internal extension Source
|
||||
@@ -433,4 +440,14 @@ public extension Source
|
||||
let source = Source.first(satisfying: NSPredicate(format: "%K == %@", #keyPath(Source.identifier), Source.altStoreIdentifier), in: context)
|
||||
return source
|
||||
}
|
||||
|
||||
class func make(name: String, identifier: String, sourceURL: URL, context: NSManagedObjectContext) -> Source
|
||||
{
|
||||
let source = Source(context: context)
|
||||
source.name = name
|
||||
source.identifier = identifier
|
||||
source.sourceURL = sourceURL
|
||||
|
||||
return source
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user