Commit f1aa273078f576a5849b0e81cdf0c5e5628db0df

Authored by Artem Talko
1 parent 14aa9047

fixes

Showing 33 changed files with 49 additions and 51 deletions
@@ -10,7 +10,7 @@ import UIKit @@ -10,7 +10,7 @@ import UIKit
10 import Realm 10 import Realm
11 import RealmSwift 11 import RealmSwift
12 12
13 -class BrowserTabDataBase: Object { 13 +final class BrowserTabDataBase: Object {
14 @Persisted(primaryKey: true) var tabId: String = UUID().uuidString 14 @Persisted(primaryKey: true) var tabId: String = UUID().uuidString
15 @Persisted var tabTitle: String 15 @Persisted var tabTitle: String
16 @Persisted var TabUrl: String 16 @Persisted var TabUrl: String
@@ -10,7 +10,7 @@ import UIKit @@ -10,7 +10,7 @@ import UIKit
10 import Realm 10 import Realm
11 import RealmSwift 11 import RealmSwift
12 12
13 -class HistoryDataBase: Object { 13 +final class HistoryDataBase: Object {
14 @Persisted(primaryKey: true) var historyCellId: String = UUID().uuidString 14 @Persisted(primaryKey: true) var historyCellId: String = UUID().uuidString
15 @Persisted var siteTitle: String 15 @Persisted var siteTitle: String
16 @Persisted var siteUrl: String 16 @Persisted var siteUrl: String
@@ -9,7 +9,7 @@ import UIKit @@ -9,7 +9,7 @@ import UIKit
9 import Realm 9 import Realm
10 import RealmSwift 10 import RealmSwift
11 11
12 -class HistoryDBManager { 12 +final class HistoryDBManager {
13 static let shared = HistoryDBManager() 13 static let shared = HistoryDBManager()
14 private let realm: Realm 14 private let realm: Realm
15 15
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 // 4 //
5 // Created by Artem Talko on 29.09.2023. 5 // Created by Artem Talko on 29.09.2023.
6 // 6 //
7 -//MARK: Checked 7 +
8 import UIKit 8 import UIKit
9 import RealmSwift 9 import RealmSwift
10 10
@@ -34,6 +34,7 @@ final class HistoryViewController: UIViewController { @@ -34,6 +34,7 @@ final class HistoryViewController: UIViewController {
34 override func viewDidLoad() { 34 override func viewDidLoad() {
35 super.viewDidLoad() 35 super.viewDidLoad()
36 36
  37 + historyData = HistoryDBManager.shared.getHistoryDataForTableView()
37 initViewController() 38 initViewController()
38 } 39 }
39 40
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 29.09.2023. 5 // Created by Artem Talko on 29.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 import SnapKit 9 import SnapKit
@@ -67,26 +66,26 @@ final class HistoryTableViewCell: UITableViewCell { @@ -67,26 +66,26 @@ final class HistoryTableViewCell: UITableViewCell {
67 66
68 private func setupConstraints() { 67 private func setupConstraints() {
69 searchImageLogo.snp.makeConstraints { make in 68 searchImageLogo.snp.makeConstraints { make in
70 - make.leading.equalToSuperview().inset(8.sizeW)  
71 make.top.equalToSuperview().inset(8.sizeH) 69 make.top.equalToSuperview().inset(8.sizeH)
  70 + make.leading.equalToSuperview().inset(8.sizeW)
72 make.height.equalTo(18.sizeW) 71 make.height.equalTo(18.sizeW)
73 make.width.equalTo(18.sizeW) 72 make.width.equalTo(18.sizeW)
74 } 73 }
75 74
76 lastVisitSiteLabel.snp.makeConstraints { make in 75 lastVisitSiteLabel.snp.makeConstraints { make in
  76 + make.top.equalToSuperview().inset(8.sizeH)
77 make.leading.equalTo(searchImageLogo.snp.trailing).offset(8.sizeW) 77 make.leading.equalTo(searchImageLogo.snp.trailing).offset(8.sizeW)
78 make.trailing.equalTo(lastVisitDateLabel.snp.leading).offset(-8.sizeW) 78 make.trailing.equalTo(lastVisitDateLabel.snp.leading).offset(-8.sizeW)
79 - make.top.equalToSuperview().inset(8.sizeH)  
80 } 79 }
81 80
82 lastVisitDateLabel.snp.makeConstraints { make in 81 lastVisitDateLabel.snp.makeConstraints { make in
83 - make.trailing.equalToSuperview().inset(8.sizeW)  
84 make.top.equalToSuperview().inset(8.sizeH) 82 make.top.equalToSuperview().inset(8.sizeH)
  83 + make.trailing.equalToSuperview().inset(8.sizeW)
85 } 84 }
86 85
87 lastVisitSiteUrlLabel.snp.makeConstraints { make in 86 lastVisitSiteUrlLabel.snp.makeConstraints { make in
88 - make.leading.equalToSuperview().offset(34.sizeW)  
89 make.top.equalTo(lastVisitSiteLabel.snp.bottom).offset(4.sizeH) 87 make.top.equalTo(lastVisitSiteLabel.snp.bottom).offset(4.sizeH)
  88 + make.leading.equalToSuperview().offset(34.sizeW)
90 make.bottom.equalToSuperview().inset(8.sizeH) 89 make.bottom.equalToSuperview().inset(8.sizeH)
91 make.trailing.equalToSuperview().inset(61.sizeW) 90 make.trailing.equalToSuperview().inset(61.sizeW)
92 } 91 }
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 01.10.2023. 5 // Created by Artem Talko on 01.10.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -14,6 +13,7 @@ final class HistorySearchBarView: UIView { @@ -14,6 +13,7 @@ final class HistorySearchBarView: UIView {
14 let magnifyImage = UIImage(systemName: "magnifyingglass")?.withTintColor(.gray, renderingMode: .alwaysOriginal) 13 let magnifyImage = UIImage(systemName: "magnifyingglass")?.withTintColor(.gray, renderingMode: .alwaysOriginal)
15 obj.image = magnifyImage 14 obj.image = magnifyImage
16 obj.contentMode = .scaleAspectFit 15 obj.contentMode = .scaleAspectFit
  16 +
17 return obj 17 return obj
18 }() 18 }()
19 19
@@ -21,6 +21,7 @@ final class HistorySearchBarView: UIView { @@ -21,6 +21,7 @@ final class HistorySearchBarView: UIView {
21 let obj = UITextField() 21 let obj = UITextField()
22 obj.text = StringConstants.search 22 obj.text = StringConstants.search
23 obj.textColor = ColorConstants.gray 23 obj.textColor = ColorConstants.gray
  24 +
24 return obj 25 return obj
25 }() 26 }()
26 27
@@ -43,14 +44,14 @@ final class HistorySearchBarView: UIView { @@ -43,14 +44,14 @@ final class HistorySearchBarView: UIView {
43 44
44 private func setupConstraints() { 45 private func setupConstraints() {
45 searchImageView.snp.makeConstraints { make in 46 searchImageView.snp.makeConstraints { make in
46 - make.leading.equalToSuperview().offset(16.sizeW)  
47 make.top.bottom.equalToSuperview().inset(8.sizeH) 47 make.top.bottom.equalToSuperview().inset(8.sizeH)
  48 + make.leading.equalToSuperview().offset(16.sizeW)
48 make.height.equalTo(16.sizeH) 49 make.height.equalTo(16.sizeH)
49 } 50 }
50 searchTextFieldView.snp.makeConstraints { make in 51 searchTextFieldView.snp.makeConstraints { make in
  52 + make.top.bottom.equalToSuperview().inset(8.sizeH)
51 make.leading.equalTo(searchImageView).offset(32.sizeW) 53 make.leading.equalTo(searchImageView).offset(32.sizeW)
52 make.trailing.equalToSuperview().offset(-16.sizeW) 54 make.trailing.equalToSuperview().offset(-16.sizeW)
53 - make.top.bottom.equalToSuperview().inset(8.sizeH)  
54 } 55 }
55 } 56 }
56 } 57 }
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 29.09.2023. 5 // Created by Artem Talko on 29.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -22,11 +21,13 @@ final class HistoryToolbarView: UIView { @@ -22,11 +21,13 @@ final class HistoryToolbarView: UIView {
22 let menuItems: [UIMenuElement] = menuCases.allCases.map { $0.action } 21 let menuItems: [UIMenuElement] = menuCases.allCases.map { $0.action }
23 obj.menu = UIMenu(title: StringConstants.menuTitle, children: menuItems) 22 obj.menu = UIMenu(title: StringConstants.menuTitle, children: menuItems)
24 obj.showsMenuAsPrimaryAction = true 23 obj.showsMenuAsPrimaryAction = true
  24 +
25 return obj 25 return obj
26 }() 26 }()
27 27
28 override init(frame: CGRect) { 28 override init(frame: CGRect) {
29 super.init(frame: frame) 29 super.init(frame: frame)
  30 +
30 setupUI() 31 setupUI()
31 } 32 }
32 33
@@ -43,9 +44,9 @@ final class HistoryToolbarView: UIView { @@ -43,9 +44,9 @@ final class HistoryToolbarView: UIView {
43 44
44 private func setupConstraints() { 45 private func setupConstraints() {
45 cleanHistoryButton.snp.makeConstraints { make in 46 cleanHistoryButton.snp.makeConstraints { make in
  47 + make.top.bottom.equalToSuperview()
46 make.trailing.equalToSuperview().inset(20.sizeW) 48 make.trailing.equalToSuperview().inset(20.sizeW)
47 make.height.equalTo(20.sizeH) 49 make.height.equalTo(20.sizeH)
48 - make.top.bottom.equalToSuperview()  
49 } 50 }
50 } 51 }
51 } 52 }
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 // 4 //
5 // Created by Artem Talko on 29.09.2023. 5 // Created by Artem Talko on 29.09.2023.
6 // 6 //
7 -//MARK: Checked 7 +
8 import UIKit 8 import UIKit
9 9
10 final class HistoryView: UIView { 10 final class HistoryView: UIView {
@@ -12,22 +12,26 @@ final class HistoryView: UIView { @@ -12,22 +12,26 @@ final class HistoryView: UIView {
12 let obj = HistorySearchBarView() 12 let obj = HistorySearchBarView()
13 obj.layer.cornerRadius = 10 13 obj.layer.cornerRadius = 10
14 obj.backgroundColor = UIColor(red: 0.913, green: 0.913, blue: 0.947, alpha: 1) 14 obj.backgroundColor = UIColor(red: 0.913, green: 0.913, blue: 0.947, alpha: 1)
  15 +
15 return obj 16 return obj
16 }() 17 }()
17 18
18 let historyTabsTableView: UITableView = { 19 let historyTabsTableView: UITableView = {
19 let obj = UITableView() 20 let obj = UITableView()
20 obj.separatorStyle = .none 21 obj.separatorStyle = .none
  22 +
21 return obj 23 return obj
22 }() 24 }()
23 25
24 let historyToolbarView: HistoryToolbarView = { 26 let historyToolbarView: HistoryToolbarView = {
25 let obj = HistoryToolbarView() 27 let obj = HistoryToolbarView()
  28 +
26 return obj 29 return obj
27 }() 30 }()
28 31
29 override init(frame: CGRect) { 32 override init(frame: CGRect) {
30 super.init(frame: frame) 33 super.init(frame: frame)
  34 +
31 setupUI() 35 setupUI()
32 } 36 }
33 37
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 25.09.2023. 5 // Created by Artem Talko on 25.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 import SnapKit 9 import SnapKit
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 25.09.2023. 5 // Created by Artem Talko on 25.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 import SnapKit 9 import SnapKit
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 25.09.2023. 5 // Created by Artem Talko on 25.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 12.10.2023. 5 // Created by Artem Talko on 12.10.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 26.09.2023. 5 // Created by Artem Talko on 26.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 27.09.2023. 5 // Created by Artem Talko on 27.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 25.09.2023. 5 // Created by Artem Talko on 25.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 26.09.2023. 5 // Created by Artem Talko on 26.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 25.09.2023. 5 // Created by Artem Talko on 25.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 27.09.2023. 5 // Created by Artem Talko on 27.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 01.10.2023. 5 // Created by Artem Talko on 01.10.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 29.09.2023. 5 // Created by Artem Talko on 29.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 import SnapKit 9 import SnapKit
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 // 4 //
5 // Created by Artem Talko on 05.10.2023. 5 // Created by Artem Talko on 05.10.2023.
6 // 6 //
7 -//MARK: Checked 7 +
8 8
9 import UIKit 9 import UIKit
10 import WebKit 10 import WebKit
@@ -39,7 +39,7 @@ final class SearchResultViewController: UIViewController { @@ -39,7 +39,7 @@ final class SearchResultViewController: UIViewController {
39 urlChecker(searchLink) 39 urlChecker(searchLink)
40 setupAdBlocker() 40 setupAdBlocker()
41 } 41 }
42 - 42 +
43 override func viewIsAppearing(_ animated: Bool) { 43 override func viewIsAppearing(_ animated: Bool) {
44 navigationController?.isNavigationBarHidden = true 44 navigationController?.isNavigationBarHidden = true
45 } 45 }
@@ -47,8 +47,8 @@ final class SearchResultViewController: UIViewController { @@ -47,8 +47,8 @@ final class SearchResultViewController: UIViewController {
47 47
48 extension SearchResultViewController { 48 extension SearchResultViewController {
49 private func urlChecker(_ url: String) { 49 private func urlChecker(_ url: String) {
50 - let request = URLRequest(url: URL(string: url) ?? URL(fileURLWithPath: ""))  
51 - mainView.searchResultView.load(request) 50 + let request = URLRequest(url: URL(string: url) ?? URL(fileURLWithPath: ""))
  51 + mainView.searchResultView.load(request)
52 } 52 }
53 } 53 }
54 54
@@ -56,17 +56,17 @@ extension SearchResultViewController { @@ -56,17 +56,17 @@ extension SearchResultViewController {
56 //MARK: AdBlocker 56 //MARK: AdBlocker
57 extension SearchResultViewController { 57 extension SearchResultViewController {
58 private func setupAdBlocker() { 58 private func setupAdBlocker() {
59 - let userDefaultsValue = CachingManager.shared.isAdBlocking  
60 - if userDefaultsValue { 59 + let userDefaultsAdblockKey = CachingManager.shared.isAdBlocking
  60 + if userDefaultsAdblockKey {
61 WKContentRuleListStore.default().getAvailableContentRuleListIdentifiers { res in 61 WKContentRuleListStore.default().getAvailableContentRuleListIdentifiers { res in
62 - if let url = Bundle.main.url(forResource: "blockerList", withExtension: "json"),  
63 - let str = try? String(contentsOf: url) {  
64 - WKContentRuleListStore.default().compileContentRuleList(forIdentifier: "blockerList", encodedContentRuleList: str) { list, error in  
65 - if let list {  
66 - self.mainView.searchResultView.configuration.userContentController.add(list)  
67 - } 62 + if let url = Bundle.main.url(forResource: "blockerList", withExtension: "json"),
  63 + let str = try? String(contentsOf: url) {
  64 + WKContentRuleListStore.default().compileContentRuleList(forIdentifier: "blockerList", encodedContentRuleList: str) { list, error in
  65 + if let list {
  66 + self.mainView.searchResultView.configuration.userContentController.add(list)
68 } 67 }
69 } 68 }
  69 + }
70 } 70 }
71 } else { 71 } else {
72 WKContentRuleListStore.default().getAvailableContentRuleListIdentifiers { res in 72 WKContentRuleListStore.default().getAvailableContentRuleListIdentifiers { res in
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 // 4 //
5 // Created by Artem Talko on 05.10.2023. 5 // Created by Artem Talko on 05.10.2023.
6 // 6 //
7 -//MARK: Checked 7 +
8 import UIKit 8 import UIKit
9 import WebKit 9 import WebKit
10 10
@@ -13,6 +13,7 @@ final class SearchResultView: UIView { @@ -13,6 +13,7 @@ final class SearchResultView: UIView {
13 let obj = WKWebView() 13 let obj = WKWebView()
14 obj.allowsBackForwardNavigationGestures = true 14 obj.allowsBackForwardNavigationGestures = true
15 obj.allowsLinkPreview = true 15 obj.allowsLinkPreview = true
  16 +
16 return obj 17 return obj
17 }() 18 }()
18 19
@@ -28,8 +29,8 @@ final class SearchResultView: UIView { @@ -28,8 +29,8 @@ final class SearchResultView: UIView {
28 29
29 private func setup() { 30 private func setup() {
30 backgroundColor = .white 31 backgroundColor = .white
31 -  
32 addSubview(searchResultView) 32 addSubview(searchResultView)
  33 +
33 setupConstaraints() 34 setupConstaraints()
34 } 35 }
35 36
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 29.09.2023. 5 // Created by Artem Talko on 29.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -56,6 +55,7 @@ extension SearchingViewController: UITableViewDelegate, UITableViewDataSource { @@ -56,6 +55,7 @@ extension SearchingViewController: UITableViewDelegate, UITableViewDataSource {
56 } 55 }
57 let searchCellData = searchRequestData[indexPath.row] 56 let searchCellData = searchRequestData[indexPath.row]
58 cell.model = searchCellData 57 cell.model = searchCellData
  58 +
59 return cell 59 return cell
60 } 60 }
61 61
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 29.09.2023. 5 // Created by Artem Talko on 29.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -62,6 +61,7 @@ final class SearchingTableViewCell: UITableViewCell { @@ -62,6 +61,7 @@ final class SearchingTableViewCell: UITableViewCell {
62 contentView.addSubview(searchLabel) 61 contentView.addSubview(searchLabel)
63 contentView.addSubview(siteLogoImage) 62 contentView.addSubview(siteLogoImage)
64 contentView.addSubview(linkImage) 63 contentView.addSubview(linkImage)
  64 +
65 setupConstraints() 65 setupConstraints()
66 } 66 }
67 67
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 // 4 //
5 // Created by Artem Talko on 29.09.2023. 5 // Created by Artem Talko on 29.09.2023.
6 // 6 //
7 -//MARK: Checked 7 +
8 import UIKit 8 import UIKit
9 9
10 final class SearchingView: UIView, UITextFieldDelegate { 10 final class SearchingView: UIView, UITextFieldDelegate {
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 08.11.2023. 5 // Created by Artem Talko on 08.11.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -15,6 +14,7 @@ final class PrivacyView: UIView { @@ -15,6 +14,7 @@ final class PrivacyView: UIView {
15 obj.numberOfLines = 0 14 obj.numberOfLines = 0
16 obj.textAlignment = .center 15 obj.textAlignment = .center
17 obj.font = FontConstants.semiboldFont_18 16 obj.font = FontConstants.semiboldFont_18
  17 +
18 return obj 18 return obj
19 }() 19 }()
20 20
@@ -23,6 +23,7 @@ final class PrivacyView: UIView { @@ -23,6 +23,7 @@ final class PrivacyView: UIView {
23 obj.text = StringConstants.settingTerms 23 obj.text = StringConstants.settingTerms
24 obj.numberOfLines = 0 24 obj.numberOfLines = 0
25 obj.font = FontConstants.regularFont_18 25 obj.font = FontConstants.regularFont_18
  26 +
26 return obj 27 return obj
27 }() 28 }()
28 29
@@ -32,18 +33,21 @@ final class PrivacyView: UIView { @@ -32,18 +33,21 @@ final class PrivacyView: UIView {
32 obj.layer.cornerRadius = 10 33 obj.layer.cornerRadius = 10
33 obj.setTitle(StringConstants.settingAgreeButtonText, for: .normal) 34 obj.setTitle(StringConstants.settingAgreeButtonText, for: .normal)
34 obj.setTitleColor(.black, for: .normal) 35 obj.setTitleColor(.black, for: .normal)
  36 +
35 return obj 37 return obj
36 }() 38 }()
37 39
38 private let privacyStackView: UIStackView = { 40 private let privacyStackView: UIStackView = {
39 let obj = UIStackView() 41 let obj = UIStackView()
40 obj.axis = .vertical 42 obj.axis = .vertical
  43 +
41 return obj 44 return obj
42 }() 45 }()
43 46
44 private let privacyScrollView: UIScrollView = { 47 private let privacyScrollView: UIScrollView = {
45 let obj = UIScrollView() 48 let obj = UIScrollView()
46 obj.showsVerticalScrollIndicator = false 49 obj.showsVerticalScrollIndicator = false
  50 +
47 return obj 51 return obj
48 }() 52 }()
49 53
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 08.11.2023. 5 // Created by Artem Talko on 08.11.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 08.11.2023. 5 // Created by Artem Talko on 08.11.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 8
10 import UIKit 9 import UIKit
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 28.09.2023. 5 // Created by Artem Talko on 28.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 import RealmSwift 9 import RealmSwift
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 28.09.2023. 5 // Created by Artem Talko on 28.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 import SnapKit 9 import SnapKit
@@ -27,6 +26,7 @@ final class OpenedTabsCollectionViewCell: UICollectionViewCell { @@ -27,6 +26,7 @@ final class OpenedTabsCollectionViewCell: UICollectionViewCell {
27 private let siteNameLabel: UILabel = { 26 private let siteNameLabel: UILabel = {
28 let obj = UILabel() 27 let obj = UILabel()
29 obj.font = FontConstants.regularFont_14 28 obj.font = FontConstants.regularFont_14
  29 +
30 return obj 30 return obj
31 }() 31 }()
32 32
@@ -34,12 +34,14 @@ final class OpenedTabsCollectionViewCell: UICollectionViewCell { @@ -34,12 +34,14 @@ final class OpenedTabsCollectionViewCell: UICollectionViewCell {
34 let obj = UIView() 34 let obj = UIView()
35 obj.clipsToBounds = true 35 obj.clipsToBounds = true
36 obj.layer.cornerRadius = 10 36 obj.layer.cornerRadius = 10
  37 +
37 return obj 38 return obj
38 }() 39 }()
39 40
40 private let sitePreviewImage: UIImageView = { 41 private let sitePreviewImage: UIImageView = {
41 let obj = UIImageView() 42 let obj = UIImageView()
42 obj.contentMode = .scaleAspectFill 43 obj.contentMode = .scaleAspectFill
  44 +
43 return obj 45 return obj
44 }() 46 }()
45 47
@@ -48,6 +50,7 @@ final class OpenedTabsCollectionViewCell: UICollectionViewCell { @@ -48,6 +50,7 @@ final class OpenedTabsCollectionViewCell: UICollectionViewCell {
48 obj.setImage(UIImage(systemName: "xmark"), for: .normal) 50 obj.setImage(UIImage(systemName: "xmark"), for: .normal)
49 obj.contentMode = .scaleAspectFill 51 obj.contentMode = .scaleAspectFill
50 obj.tintColor = .gray 52 obj.tintColor = .gray
  53 +
51 return obj 54 return obj
52 }() 55 }()
53 56
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 28.09.2023. 5 // Created by Artem Talko on 28.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 9
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 // 4 //
5 // Created by Artem Talko on 28.09.2023. 5 // Created by Artem Talko on 28.09.2023.
6 // 6 //
7 -//MARK: Checked  
8 7
9 import UIKit 8 import UIKit
10 import SnapKit 9 import SnapKit
@@ -31,6 +30,7 @@ final class TabsView: UIView { @@ -31,6 +30,7 @@ final class TabsView: UIView {
31 30
32 override init(frame: CGRect) { 31 override init(frame: CGRect) {
33 super.init(frame: frame) 32 super.init(frame: frame)
  33 +
34 setupUI() 34 setupUI()
35 } 35 }
36 36
Please register or login to post a comment