Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions iBox/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
versioningHandler.checkAppVersion { result in
AppStateManager.shared.isVersionCheckCompleted = result
}

preloadFavoriteWeb()
versioningHandler.checkAppVersion()

return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class BoxListSectionViewModel: Identifiable {
folder.name
}

var color: ColorName {
folder.color
}

var isOpened: Bool {
get {
folder.isOpened
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ extension BoxListView: UITableViewDelegate {
guard let viewModel else { return nil }
let button = FolderButton(isOpen: viewModel.boxList[section].isOpened)
button.setFolderName(viewModel.boxList[section].name)
button.setFolderColor(viewModel.boxList[section].color.toUIColor())
button.tag = section

button.addTarget(self, action: #selector(handleOpenClose), for: .touchUpInside)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class FolderButton: UIButton {
private let folderImageView = UIImageView().then {
$0.image = UIImage(systemName: "folder.fill")
$0.contentMode = .scaleAspectFit
$0.tintColor = .gray
}

private let folderNameLabel = UILabel().then {
Expand Down Expand Up @@ -78,9 +79,9 @@ class FolderButton: UIButton {
folderNameLabel.text = name
}

func setFolderColor(_ color: UIColor) {
folderImageView.tintColor = color
}
// func setFolderColor(_ color: UIColor) {
// folderImageView.tintColor = color
// }

func toggleStatus() {
isOpen = !isOpen
Expand Down
1 change: 0 additions & 1 deletion iBox/Sources/Model/Folder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Foundation
struct Folder {
var id: UUID
let name: String
let color: ColorName
let bookmarks: [Bookmark]
var isOpened: Bool = false
}
Expand Down
2 changes: 1 addition & 1 deletion iBox/Sources/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
let isDefaultDataInserted = UserDefaultsManager.isDefaultDataInserted
if !isDefaultDataInserted {
let defaultData = [
Folder(id: UUID(), name: "42 폴더", color: .gray, bookmarks: [
Folder(id: UUID(), name: "42 폴더", bookmarks: [
Bookmark(id: UUID(), name: "42 Intra", url: URL(string: "https://profile.intra.42.fr/")!),
Bookmark(id: UUID(), name: "42Where", url: URL(string: "https://www.where42.kr/")! ),
Bookmark(id: UUID(), name: "42Stat", url: URL(string: "https://stat.42seoul.kr/")!),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extension CoreDataManager {
let newFolder = FolderEntity(context: context)
newFolder.id = folder.id
newFolder.name = folder.name
newFolder.color = folder.color.rawValue
// newFolder.color = folder.color.rawValue
newFolder.order = lastFolderOrder
lastFolderOrder += 1
let bookmarks = NSMutableOrderedSet()
Expand All @@ -71,7 +71,7 @@ extension CoreDataManager {
let newFolder = FolderEntity(context: context)
newFolder.id = folder.id
newFolder.name = folder.name
newFolder.color = folder.color.rawValue
// newFolder.color = folder.color.rawValue
newFolder.order = lastFolderOrder
lastFolderOrder += 1
let bookmarks = NSMutableOrderedSet()
Expand Down Expand Up @@ -131,7 +131,7 @@ extension CoreDataManager {
guard let folderId = folderEntity.id else { return [] }
lastBookmarkOrder[folderId] = (bookmarkEntities.last?.order ?? -1) + 1
let bookmarks = bookmarkEntities.map{ Bookmark(id: $0.id ?? UUID(), name: $0.name ?? "" , url: $0.url ?? URL(string: "")!) }
folders.append(Folder(id: folderEntity.id ?? UUID(), name: folderEntity.name ?? "", color: ColorName(rawValue: folderEntity.color ?? "gray") ?? .gray , bookmarks: bookmarks))
folders.append(Folder(id: folderEntity.id ?? UUID(), name: folderEntity.name ?? "", bookmarks: bookmarks))
}

return folders
Expand Down
31 changes: 0 additions & 31 deletions iBox/Sources/Utils/ColorName.swift

This file was deleted.