Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 70a431f

Browse files
committed
actually clear the image cache when the data is updated
1 parent 2ac656d commit 70a431f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Marlin/Marlin/Networking/MSI.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ public class MSI {
9999
let dataSource = self.masterDataList.first { type in
100100
item.key == type.key
101101
}
102-
if let mapImageDataSource = dataSource as? (any MapImage) {
103-
type(of: mapImageDataSource).imageCache.clearCache()
102+
switch dataSource {
103+
case let mapImage as MapImage.Type:
104+
mapImage.imageCache.clearCache()
105+
default:
106+
break
104107
}
105108
}
106109
.store(in: &cancellable)

0 commit comments

Comments
 (0)