|
@@ -16,6 +16,9 @@ typealias KMHomeContentViewQucikToolsDidSelect = (_ view: KMHomeContentView, _ i
|
|
|
typealias KMHomeContentViewQucikToolsAddAction = (_ view: KMHomeContentView, _ item: KMQucikToolsModel) -> Void
|
|
|
typealias KMHomeContentViewQucikToolsRemoveAction = (_ view: KMHomeContentView, _ item: KMQucikToolsModel) -> Void
|
|
|
|
|
|
+
|
|
|
+let kRecentlyListModel = "kRecentlyListModel"
|
|
|
+
|
|
|
enum KMHomeQucikToolsShowType {
|
|
|
case expand
|
|
|
case collapse
|
|
@@ -117,6 +120,10 @@ class KMHomeContentView: KMBaseXibView {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ let type = UserDefaults.standard.object(forKey: kRecentlyListModel) ?? 0
|
|
|
+ historyListView.showType = KMHomeHistoryListViewShowType.init(rawValue: type as! Int) ?? .horizontal
|
|
|
+
|
|
|
self.updatePageLabel()
|
|
|
self.updateRecentlyListState()
|
|
|
}
|
|
@@ -134,6 +141,8 @@ class KMHomeContentView: KMBaseXibView {
|
|
|
verticalButton.image = NSImage(named: "KMImageNameUXIconHomeViewthumbnailPre")
|
|
|
horizontalButton.image = NSImage(named: "KMImageNameUXIconHomeViewlistNor")
|
|
|
}
|
|
|
+
|
|
|
+ UserDefaults.standard.setValue(showType.rawValue, forKey: kRecentlyListModel)
|
|
|
}
|
|
|
|
|
|
override func updateUI() {
|