chore: rename searchBottomLoader , rename pure color
This commit is contained in:
parent
f3394ff382
commit
bffb0a887b
|
@ -37,7 +37,7 @@
|
|||
2D152A9225C2980C009AA50C /* UIFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D152A9125C2980C009AA50C /* UIFont.swift */; };
|
||||
2D198643261BF09500F0B013 /* SearchResultItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D198642261BF09500F0B013 /* SearchResultItem.swift */; };
|
||||
2D198649261C0B8500F0B013 /* SearchResultSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D198648261C0B8500F0B013 /* SearchResultSection.swift */; };
|
||||
2D19864F261C372A00F0B013 /* SearchBottomLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D19864E261C372A00F0B013 /* SearchBottomLoader.swift */; };
|
||||
2D19864F261C372A00F0B013 /* CommonBottomLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D19864E261C372A00F0B013 /* CommonBottomLoader.swift */; };
|
||||
2D198655261C3C4300F0B013 /* SearchViewModel+LoadOldestState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D198654261C3C4300F0B013 /* SearchViewModel+LoadOldestState.swift */; };
|
||||
2D206B7225F5D27F00143C56 /* AudioContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D206B7125F5D27F00143C56 /* AudioContainerView.swift */; };
|
||||
2D206B8025F5F45E00143C56 /* UIImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D206B7F25F5F45E00143C56 /* UIImage.swift */; };
|
||||
|
@ -426,7 +426,7 @@
|
|||
2D152A9125C2980C009AA50C /* UIFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIFont.swift; sourceTree = "<group>"; };
|
||||
2D198642261BF09500F0B013 /* SearchResultItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultItem.swift; sourceTree = "<group>"; };
|
||||
2D198648261C0B8500F0B013 /* SearchResultSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultSection.swift; sourceTree = "<group>"; };
|
||||
2D19864E261C372A00F0B013 /* SearchBottomLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchBottomLoader.swift; sourceTree = "<group>"; };
|
||||
2D19864E261C372A00F0B013 /* CommonBottomLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonBottomLoader.swift; sourceTree = "<group>"; };
|
||||
2D198654261C3C4300F0B013 /* SearchViewModel+LoadOldestState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchViewModel+LoadOldestState.swift"; sourceTree = "<group>"; };
|
||||
2D206B7125F5D27F00143C56 /* AudioContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioContainerView.swift; sourceTree = "<group>"; };
|
||||
2D206B7F25F5F45E00143C56 /* UIImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImage.swift; sourceTree = "<group>"; };
|
||||
|
@ -1152,7 +1152,7 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
2DFAD5362617010500F9EE7C /* SearchingTableViewCell.swift */,
|
||||
2D19864E261C372A00F0B013 /* SearchBottomLoader.swift */,
|
||||
2D19864E261C372A00F0B013 /* CommonBottomLoader.swift */,
|
||||
);
|
||||
path = TableViewCell;
|
||||
sourceTree = "<group>";
|
||||
|
@ -2269,7 +2269,7 @@
|
|||
DBB5256E2612D5A1002F1F29 /* ProfileStatusDashboardView.swift in Sources */,
|
||||
2D24E1232626ED9D00A59D4F /* UIView+Gesture.swift in Sources */,
|
||||
DB45FAE325CA7181005A8AC7 /* MastodonUser.swift in Sources */,
|
||||
2D19864F261C372A00F0B013 /* SearchBottomLoader.swift in Sources */,
|
||||
2D19864F261C372A00F0B013 /* CommonBottomLoader.swift in Sources */,
|
||||
DB2FF510260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift in Sources */,
|
||||
0F202213261351F5000C64BF /* APIService+HashtagTimeline.swift in Sources */,
|
||||
DB0AC6FC25CD02E600D75117 /* APIService+Instance.swift in Sources */,
|
||||
|
|
|
@ -128,7 +128,7 @@ extension NotificationSection {
|
|||
return cell
|
||||
}
|
||||
case .bottomLoader:
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: SearchBottomLoader.self)) as! SearchBottomLoader
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: CommonBottomLoader.self)) as! CommonBottomLoader
|
||||
cell.startAnimating()
|
||||
return cell
|
||||
}
|
||||
|
@ -149,8 +149,11 @@ extension NotificationSection {
|
|||
) {
|
||||
// disable interaction
|
||||
cell.statusView.isUserInteractionEnabled = false
|
||||
// remove actionToolBar
|
||||
// remove item don't display
|
||||
cell.statusView.actionToolbarContainer.removeFromSuperview()
|
||||
cell.statusView.avatarView.removeFromSuperview()
|
||||
|
||||
|
||||
// setup attribute
|
||||
statusItemAttribute.setupForStatus(status: status)
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ extension SearchResultSection {
|
|||
cell.config(with: user)
|
||||
return cell
|
||||
case .bottomLoader:
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: SearchBottomLoader.self)) as! SearchBottomLoader
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: CommonBottomLoader.self)) as! CommonBottomLoader
|
||||
cell.startAnimating()
|
||||
return cell
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ internal enum Asset {
|
|||
internal static let mediaTypeIndicotor = ColorAsset(name: "Colors/Background/media.type.indicotor")
|
||||
internal static let navigationBar = ColorAsset(name: "Colors/Background/navigationBar")
|
||||
internal static let onboardingBackground = ColorAsset(name: "Colors/Background/onboarding.background")
|
||||
internal static let searchResult = ColorAsset(name: "Colors/Background/searchResult")
|
||||
internal static let pure = ColorAsset(name: "Colors/Background/pure")
|
||||
internal static let secondaryGroupedSystemBackground = ColorAsset(name: "Colors/Background/secondary.grouped.system.background")
|
||||
internal static let secondarySystemBackground = ColorAsset(name: "Colors/Background/secondary.system.background")
|
||||
internal static let systemBackground = ColorAsset(name: "Colors/Background/system.background")
|
||||
|
|
|
@ -33,7 +33,7 @@ final class NotificationViewController: UIViewController, NeedsDependency {
|
|||
tableView.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
|
||||
tableView.register(NotificationTableViewCell.self, forCellReuseIdentifier: String(describing: NotificationTableViewCell.self))
|
||||
tableView.register(NotificationStatusTableViewCell.self, forCellReuseIdentifier: String(describing: NotificationStatusTableViewCell.self))
|
||||
tableView.register(SearchBottomLoader.self, forCellReuseIdentifier: String(describing: SearchBottomLoader.self))
|
||||
tableView.register(CommonBottomLoader.self, forCellReuseIdentifier: String(describing: CommonBottomLoader.self))
|
||||
tableView.tableFooterView = UIView()
|
||||
tableView.rowHeight = UITableView.automaticDimension
|
||||
return tableView
|
||||
|
@ -47,7 +47,7 @@ extension NotificationViewController {
|
|||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
view.backgroundColor = Asset.Colors.Background.searchResult.color
|
||||
view.backgroundColor = Asset.Colors.Background.pure.color
|
||||
navigationItem.titleView = segmentControl
|
||||
segmentControl.addTarget(self, action: #selector(NotificationViewController.segmentedControlValueChanged(_:)), for: .valueChanged)
|
||||
view.addSubview(tableView)
|
||||
|
|
|
@ -27,7 +27,7 @@ final class NotificationStatusTableViewCell: UITableViewCell {
|
|||
|
||||
let actionImageView: UIImageView = {
|
||||
let imageView = UIImageView()
|
||||
imageView.tintColor = Asset.Colors.Background.searchResult.color
|
||||
imageView.tintColor = Asset.Colors.Background.pure.color
|
||||
return imageView
|
||||
}()
|
||||
|
||||
|
@ -37,8 +37,8 @@ final class NotificationStatusTableViewCell: UITableViewCell {
|
|||
view.layer.cornerCurve = .continuous
|
||||
view.clipsToBounds = true
|
||||
view.layer.borderWidth = NotificationStatusTableViewCell.actionImageBorderWidth
|
||||
view.layer.borderColor = Asset.Colors.Background.searchResult.color.cgColor
|
||||
view.tintColor = Asset.Colors.Background.searchResult.color
|
||||
view.layer.borderColor = Asset.Colors.Background.pure.color.cgColor
|
||||
view.tintColor = Asset.Colors.Background.pure.color
|
||||
return view
|
||||
}()
|
||||
|
||||
|
@ -143,6 +143,6 @@ extension NotificationStatusTableViewCell {
|
|||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
super.traitCollectionDidChange(previousTraitCollection)
|
||||
statusContainer.layer.borderColor = Asset.Colors.Border.notification.color.cgColor
|
||||
actionImageBackground.layer.borderColor = Asset.Colors.Background.searchResult.color.cgColor
|
||||
actionImageBackground.layer.borderColor = Asset.Colors.Background.pure.color.cgColor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ final class NotificationTableViewCell: UITableViewCell {
|
|||
|
||||
let actionImageView: UIImageView = {
|
||||
let imageView = UIImageView()
|
||||
imageView.tintColor = Asset.Colors.Background.searchResult.color
|
||||
imageView.tintColor = Asset.Colors.Background.pure.color
|
||||
return imageView
|
||||
}()
|
||||
|
||||
|
@ -45,8 +45,8 @@ final class NotificationTableViewCell: UITableViewCell {
|
|||
view.layer.cornerCurve = .continuous
|
||||
view.clipsToBounds = true
|
||||
view.layer.borderWidth = NotificationTableViewCell.actionImageBorderWidth
|
||||
view.layer.borderColor = Asset.Colors.Background.searchResult.color.cgColor
|
||||
view.tintColor = Asset.Colors.Background.searchResult.color
|
||||
view.layer.borderColor = Asset.Colors.Background.pure.color.cgColor
|
||||
view.tintColor = Asset.Colors.Background.pure.color
|
||||
return view
|
||||
}()
|
||||
|
||||
|
@ -116,6 +116,6 @@ extension NotificationTableViewCell {
|
|||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
super.traitCollectionDidChange(previousTraitCollection)
|
||||
actionImageBackground.layer.borderColor = Asset.Colors.Background.searchResult.color.cgColor
|
||||
actionImageBackground.layer.borderColor = Asset.Colors.Background.pure.color.cgColor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ extension SearchViewController {
|
|||
func setupSearchingTableView() {
|
||||
searchingTableView.delegate = self
|
||||
searchingTableView.register(SearchingTableViewCell.self, forCellReuseIdentifier: String(describing: SearchingTableViewCell.self))
|
||||
searchingTableView.register(SearchBottomLoader.self, forCellReuseIdentifier: String(describing: SearchBottomLoader.self))
|
||||
searchingTableView.register(CommonBottomLoader.self, forCellReuseIdentifier: String(describing: CommonBottomLoader.self))
|
||||
view.addSubview(searchingTableView)
|
||||
searchingTableView.constrain([
|
||||
searchingTableView.frameLayoutGuide.topAnchor.constraint(equalTo: searchBar.bottomAnchor),
|
||||
|
|
|
@ -82,7 +82,7 @@ final class SearchViewController: UIViewController, NeedsDependency {
|
|||
// searching
|
||||
let searchingTableView: UITableView = {
|
||||
let tableView = UITableView()
|
||||
tableView.backgroundColor = Asset.Colors.Background.searchResult.color
|
||||
tableView.backgroundColor = Asset.Colors.Background.pure.color
|
||||
tableView.rowHeight = UITableView.automaticDimension
|
||||
tableView.separatorStyle = .singleLine
|
||||
tableView.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
|
||||
|
@ -227,7 +227,7 @@ extension SearchViewController: UISearchBarDelegate {
|
|||
}
|
||||
|
||||
extension SearchViewController: LoadMoreConfigurableTableViewContainer {
|
||||
typealias BottomLoaderTableViewCell = SearchBottomLoader
|
||||
typealias BottomLoaderTableViewCell = CommonBottomLoader
|
||||
typealias LoadingState = SearchViewModel.LoadOldestState.Loading
|
||||
var loadMoreConfigurableTableView: UITableView { searchingTableView }
|
||||
var loadMoreConfigurableStateMachine: GKStateMachine { viewModel.loadoldestStateMachine }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// SearchBottomLoader.swift
|
||||
// CommonBottomLoader.swift
|
||||
// Mastodon
|
||||
//
|
||||
// Created by sxiaojian on 2021/4/6.
|
||||
|
@ -8,7 +8,7 @@
|
|||
import Foundation
|
||||
import UIKit
|
||||
|
||||
final class SearchBottomLoader: UITableViewCell {
|
||||
final class CommonBottomLoader: UITableViewCell {
|
||||
let activityIndicatorView: UIActivityIndicatorView = {
|
||||
let activityIndicatorView = UIActivityIndicatorView(style: .medium)
|
||||
activityIndicatorView.tintColor = Asset.Colors.Label.primary.color
|
Loading…
Reference in New Issue