Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PhoneManager
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yang
PhoneManager
Commits
77c59570
Commit
77c59570
authored
May 16, 2025
by
CZ1004
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_zhaoqian' into dev_main
* dev_zhaoqian: 【修改】优化
parents
6a947483
39235c65
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
18 deletions
+39
-18
HomePhotosDetailViewController.swift
...Page/Home/Controller/HomePhotosDetailViewController.swift
+3
-1
HomeVideoDetailController.swift
...lass/Page/Home/Controller/HomeVideoDetailController.swift
+3
-5
HomeInfoView.swift
PhoneManager/Class/Page/Home/View/HomeInfoView.swift
+33
-12
No files found.
PhoneManager/Class/Page/Home/Controller/HomePhotosDetailViewController.swift
View file @
77c59570
...
...
@@ -265,7 +265,9 @@ class HomePhotosDetailViewController : BaseViewController {
/// 获取当前页面数据
/// - Parameter completed: 完成回调
func
getCurrentPageData
(
completed
:
@escaping
()
->
Void
){
// FIXME: 从新获取数据
PhotoManager
.
shared
.
reloadTrashAndKeep
()
var
data
=
self
.
mediaType
==
.
Other
?
PhotoManager
.
shared
.
filterOtherModels
:
PhotoManager
.
shared
.
filterScreenShotModels
// 过滤掉垃圾桶数据
...
...
PhoneManager/Class/Page/Home/Controller/HomeVideoDetailController.swift
View file @
77c59570
...
...
@@ -101,6 +101,9 @@ class HomeVideoDetailController :BaseViewController {
/// 获取当前页面数据
/// - Parameter completed: 完成回调
func
getCurrentPageData
(
completed
:
@escaping
()
->
Void
){
PhotoManager
.
shared
.
reloadTrashAndKeep
()
var
data
=
PhotoManager
.
shared
.
filterVideoModels
// 过滤掉垃圾桶数据
...
...
@@ -597,11 +600,6 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
// 移除当前数据
self
.
resourceData
.
removeAll
{
$0
.
localIdentifier
==
item
.
localIdentifier
}
}
// 清理下缓存数据
//PhotoDataManager.manager.removeDataWhenDeleteInPage(data: self.selectedModel)
PhotoManager
.
shared
.
removeDataWhenDeleteInPage
(
data
:
self
.
selectedModel
)
{
// 删除完成刷新数据
}
...
...
PhoneManager/Class/Page/Home/View/HomeInfoView.swift
View file @
77c59570
...
...
@@ -167,6 +167,15 @@ class HomeInfoView :UIView {
make
.
height
.
equalTo
(
38
)
make
.
width
.
equalTo
(
24
)
}
self
.
nextRowButton
.
isHidden
=
!
self
.
isShowNextRowButton
()
}
/// 是否显示下一个按钮
/// - Returns: 是否显示
func
isShowNextRowButton
()
->
Bool
{
return
self
.
ids
?
.
count
??
0
>
0
&&
(
self
.
type
==
.
similar
||
self
.
type
==
.
similarScreenshots
)
}
func
changeValue
()
{
...
...
@@ -298,6 +307,7 @@ class HomeInfoView :UIView {
deleteView
.
changeContent
(
title
:
self
.
type
!.
rawValue
,
seletedCount
:
seletedNumber
)
tableView
.
contentInset
=
UIEdgeInsets
(
top
:
0
,
left
:
0
,
bottom
:
deleteView
.
isHidden
?
12
:
deleteView
.
height
+
12
,
right
:
0
)
self
.
nextRowButton
.
isHidden
=
!
self
.
isShowNextRowButton
()
}
}
...
...
@@ -337,18 +347,29 @@ extension HomeInfoView:UITableViewDataSource,UITableViewDelegate {
/// 让表格自动滚动一行
private
func
tableScrollToNextRow
(){
if
let
indexPath
=
tableView
.
indexPathsForVisibleRows
?
.
first
{
// 计算下一行的索引
private
func
tableScrollToNextRow
()
{
guard
let
indexPath
=
tableView
.
indexPathsForVisibleRows
?
.
first
else
{
return
}
let
nextRow
=
indexPath
.
row
+
1
let
nextSection
=
indexPath
.
section
// 检查下一行是否存在
if
nextRow
<
tableView
.
numberOfRows
(
inSection
:
nextSection
)
{
guard
nextRow
<
tableView
.
numberOfRows
(
inSection
:
nextSection
)
else
{
return
}
let
nextIndexPath
=
IndexPath
(
row
:
nextRow
,
section
:
nextSection
)
// 滚动到下一行
tableView
.
scrollToRow
(
at
:
nextIndexPath
,
at
:
.
top
,
animated
:
true
)
}
}
// 计算目标行的位置
let
targetRect
=
tableView
.
rectForRow
(
at
:
nextIndexPath
)
// 向上微调的偏移量(例如 20 点)
let
adjustedOffset
=
CGPoint
(
x
:
0
,
y
:
targetRect
.
origin
.
y
-
38
// 修改这里的数值调整微调量
)
// 直接滚动到调整后的位置
tableView
.
setContentOffset
(
adjustedOffset
,
animated
:
true
)
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment