Refactor AppServices into grouped bundles and document DI conventions.
Centralize dependency wiring with Session/Context/Network/UI/Runtime bundles, unify leaf ViewControllers on appServices, and add a test initializer with AppServicesTests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -42,7 +42,8 @@ final class TitleSubtitleTableViewCell: UITableViewCell {
|
||||
|
||||
/// 模块列表页基类,封装 UITableView Diffable、下拉刷新和 ViewModel onChange 绑定。
|
||||
class ModuleTableViewController: UIViewController, UITableViewDelegate {
|
||||
let services = AppServices.shared
|
||||
/// 全局依赖容器快捷访问,等价于 `appServices`。
|
||||
var services: AppServices { appServices }
|
||||
let tableView = UITableView(frame: .zero, style: .insetGrouped)
|
||||
private let refreshControl = UIRefreshControl()
|
||||
private let activityIndicator = UIActivityIndicatorView(style: .medium)
|
||||
@ -289,7 +290,8 @@ private extension Array {
|
||||
|
||||
/// 模块复杂列表基类,封装 UICollectionView Diffable 与下拉刷新。
|
||||
class ModuleCollectionViewController: UIViewController {
|
||||
let services = AppServices.shared
|
||||
/// 全局依赖容器快捷访问,等价于 `appServices`。
|
||||
var services: AppServices { appServices }
|
||||
let collectionView: UICollectionView
|
||||
private let refreshControl = UIRefreshControl()
|
||||
private let activityIndicator = UIActivityIndicatorView(style: .medium)
|
||||
|
||||
Reference in New Issue
Block a user