@@ -13,7 +13,7 @@ class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDe
13
13
private var refreshTimer : Timer ?
14
14
private var showOSBuildVersion = false
15
15
16
- private var allDatainSection = 4
16
+ private var allDataInSection = 4
17
17
18
18
override func viewDidLoad( ) {
19
19
super. viewDidLoad ( )
@@ -56,7 +56,7 @@ class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDe
56
56
if !BatteryDataController. checkRunTimePermission ( ) {
57
57
58
58
if !BatteryDataController. checkInstallPermission ( ) {
59
- let alert = UIAlertController ( title: NSLocalizedString ( " Alert " , comment: " " ) , message: NSLocalizedString ( " NeedRunTimePremissionMessage " , comment: " " ) , preferredStyle: . alert)
59
+ let alert = UIAlertController ( title: NSLocalizedString ( " Alert " , comment: " " ) , message: NSLocalizedString ( " NeedRunTimePermissionMessage " , comment: " " ) , preferredStyle: . alert)
60
60
alert. addAction ( UIAlertAction ( title: NSLocalizedString ( " Dismiss " , comment: " " ) , style: . cancel) )
61
61
present ( alert, animated: true )
62
62
@@ -130,10 +130,10 @@ class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDe
130
130
// MARK: - 设置总分组数量
131
131
func numberOfSections( in tableView: UITableView ) -> Int {
132
132
if settingsUtils. getShowSettingsBatteryInfo ( ) {
133
- allDatainSection = 4
133
+ allDataInSection = 4
134
134
return 5
135
135
} else {
136
- allDatainSection = 3
136
+ allDataInSection = 3
137
137
return 4
138
138
}
139
139
}
@@ -149,7 +149,7 @@ class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDe
149
149
return 2
150
150
case 1 : return 9 // 电池信息
151
151
case 2 : // 充电信息
152
- if settingsUtils. getForceShowChargeingData ( ) {
152
+ if settingsUtils. getForceShowChargingData ( ) {
153
153
return 11
154
154
} else {
155
155
if isDeviceCharging ( ) || isChargeByWatts ( ) {
@@ -444,7 +444,7 @@ class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDe
444
444
}
445
445
}
446
446
447
- if indexPath. section == allDatainSection {
447
+ if indexPath. section == allDataInSection {
448
448
cell. accessoryType = . disclosureIndicator
449
449
if indexPath. row == 0 { // 显示全部数据
450
450
cell. textLabel? . text = NSLocalizedString ( " AllData " , comment: " " )
@@ -462,7 +462,7 @@ class HomeViewController: UIViewController, UITableViewDataSource, UITableViewDe
462
462
if indexPath. section == 0 && indexPath. row == 0 {
463
463
self . showOSBuildVersion = !showOSBuildVersion
464
464
tableView. reloadRows ( at: [ indexPath] , with: . none)
465
- } else if indexPath. section == allDatainSection {
465
+ } else if indexPath. section == allDataInSection {
466
466
if indexPath. row == 0 { // 显示全部数据
467
467
let allBatteryDataViewController = AllBatteryDataViewController ( )
468
468
allBatteryDataViewController. hidesBottomBarWhenPushed = true // 隐藏底部导航栏
0 commit comments