Using shadows on all texts and icons to see them better when background is white. Buffering database previews to show faster the Library. Updated how RAM usage is computed and now show max memory. Added warnings when RAM usage is low.

This commit is contained in:
matlabbe
2025-02-15 17:33:26 -08:00
parent 15be406509
commit 994fad982f
3 changed files with 129 additions and 48 deletions

View File

@@ -55,11 +55,19 @@ class DatabaseView: UIView {
super.init(frame: frame)
self.databaseURL = databaseURL
commonInit(databasePath: databaseURL.path)
DispatchQueue.global().async {
let downloadedImage = getPreviewImage(databasePath: databaseURL.path)
DispatchQueue.main.async {
self.coverImageView.image = downloadedImage
}
if let image = ViewController.previewImages[databaseURL.path]
{
self.coverImageView.image = image
}
else
{
DispatchQueue.global().async {
let downloadedImage = getPreviewImage(databasePath: databaseURL.path)
DispatchQueue.main.async {
self.coverImageView.image = downloadedImage
ViewController.previewImages[databaseURL.path] = downloadedImage
}
}
}
}