Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana committed Oct 18, 2023
1 parent 47446de commit c56743f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iOSClient/Media/NCMediaManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import UIKit
import LRUCache
import NextcloudKit

@objc class NCMediaManager {
@objc class NCMediaManager: NSObject {

@objc public static let shared: NCMediaManager = {
let instance = NCMediaManager()
return instance
}()

private typealias ThumbnailLRUCache = LRUCache<String, UIImage>
private let cache: ThumbnailLRUCache = ThumbnailLRUCache(countLimit: 1500)
private let cache: ThumbnailLRUCache = ThumbnailLRUCache(countLimit: 2000)

func createCache(account: String) {
@objc func createCache(account: String) {

let resultsMedia = NCManageDatabase.shared.getMediaOcIdEtag(account: account)
guard !resultsMedia.isEmpty,
Expand Down
2 changes: 2 additions & 0 deletions iOSClient/Settings/CCAdvanced.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ - (void)initializeForm
} else {
[[[NextcloudKit shared] nkCommonInstance] writeLog:[NSString stringWithFormat:@"[INFO] Clear log with level %lu %@", (unsigned long)logLevel, versionNextcloudiOS]];
}

[[NCMediaManager shared] createCacheWithAccount:appDelegate.account];
};
[section addFormRow:row];

Expand Down

0 comments on commit c56743f

Please sign in to comment.