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
1 change: 0 additions & 1 deletion iBox/Resources/iBox.xcdatamodeld/iBox.xcdatamodel/contents
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<relationship name="folder" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="FolderEntity" inverseName="bookmarks" inverseEntity="FolderEntity"/>
</entity>
<entity name="FolderEntity" representedClassName="FolderEntity" syncable="YES" codeGenerationType="class">
<attribute name="color" attributeType="String"/>
<attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
<attribute name="name" attributeType="String"/>
<attribute name="order" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
Expand Down
5 changes: 4 additions & 1 deletion iBox/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

Task {
preloadFavoriteWeb()
}

versioningHandler.checkAppVersion { result in
AppStateManager.shared.isVersionCheckCompleted = result
}
preloadFavoriteWeb()

return true
}
Expand Down
4 changes: 0 additions & 4 deletions iBox/Sources/BoxList/FolderButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ class FolderButton: UIButton {
folderNameLabel.text = name
}

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

func toggleStatus() {
isOpen = !isOpen
openCloseImageView.image = isOpen ? UIImage(systemName: "chevron.up") : UIImage(systemName: "chevron.down")
Expand Down
4 changes: 0 additions & 4 deletions iBox/Sources/Favorite/FavoriteViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ class FavoriteViewController: BaseViewController<FavoriteView>, BaseViewControll
setupNavigationBar()
}

override func viewDidDisappear(_ animated: Bool) {
WebViewPreloader.shared.resetFavoriteView()
}

// MARK: - BaseViewControllerProtocol

func setupNavigationBar() {
Expand Down
12 changes: 12 additions & 0 deletions iBox/Sources/Main/MainTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ import UIKit

class MainTabBarController: UITabBarController {

var previousTabIndex = 0

// MARK: - Life Cycle

override func viewDidLoad() {
super.viewDidLoad()
delegate = self
view.backgroundColor = .backgroundColor

setupTabBar()
Expand Down Expand Up @@ -45,3 +48,12 @@ class MainTabBarController: UITabBarController {
}

}

extension MainTabBarController: UITabBarControllerDelegate {
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
if tabBarController.selectedIndex == 1 && previousTabIndex == 1 {
WebViewPreloader.shared.resetFavoriteView()
}
previousTabIndex = tabBarController.selectedIndex
}
}
2 changes: 1 addition & 1 deletion iBox/Sources/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

insertDefaultDataIfNeeded()

window?.rootViewController = MainTabBarController()
window?.rootViewController = CustomLaunchScreenViewController()
window?.makeKeyAndVisible() // 윈도우를 화면에 보여줌

if let urlContext = connectionOptions.urlContexts.first {
Expand Down
5 changes: 1 addition & 4 deletions iBox/Sources/Shared/CoreDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ extension CoreDataManager {
let newFolder = FolderEntity(context: context)
newFolder.id = folder.id
newFolder.name = folder.name
// newFolder.color = folder.color.rawValue
newFolder.order = lastFolderOrder
lastFolderOrder += 1
let bookmarks = NSMutableOrderedSet()
Expand All @@ -71,7 +70,6 @@ extension CoreDataManager {
let newFolder = FolderEntity(context: context)
newFolder.id = folder.id
newFolder.name = folder.name
// newFolder.color = folder.color.rawValue
newFolder.order = lastFolderOrder
lastFolderOrder += 1
let bookmarks = NSMutableOrderedSet()
Expand Down Expand Up @@ -162,10 +160,9 @@ extension CoreDataManager {
save()
}

func updateFolder(id: UUID, name: String, color: String) {
func updateFolder(id: UUID, name: String) {
guard let folder = getFolderEntity(id: id) else { return }
folder.name = name
folder.color = color
save()
}

Expand Down