Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
42a898b1
Commit
42a898b1
authored
Dec 11, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
c15f3219
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
YHAIMainChatViewController.swift
...s/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
+3
-6
YHAIRobotChatViewController.swift
.../AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
+8
-8
YHAIServiceListViewController.swift
...I/AI-Dialogue(AI对话)/C/YHAIServiceListViewController.swift
+2
-1
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
View file @
42a898b1
...
...
@@ -111,7 +111,7 @@ class YHAIMainChatViewController: YHBaseViewController {
self
.
tableView
.
reloadData
()
if
canTriggerProgrammaticScroll
()
{
if
disableScrollToBottom
{
return
}
...
...
@@ -224,7 +224,9 @@ class YHAIMainChatViewController: YHBaseViewController {
}
callBack
:
{
self
.
manager
.
clearGlobalConverastionId
()
YHHUD
.
flash
(
message
:
"删除历史记录中..."
)
self
.
viewModel
.
requestConversationId
{
sessionId
in
YHHUD
.
hide
()
if
!
sessionId
.
isEmpty
{
self
.
conversationId
=
sessionId
self
.
manager
.
saveGlobalConverastionId
(
sessionId
)
...
...
@@ -417,11 +419,6 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
func
scrollViewDidEndDecelerating
(
_
scrollView
:
UIScrollView
)
{
}
// 检查是否可以执行代码触发的滚动
func
canTriggerProgrammaticScroll
()
->
Bool
{
return
!
disableScrollToBottom
}
}
extension
YHAIMainChatViewController
:
JXSegmentedListContainerViewListDelegate
{
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
View file @
42a898b1
...
...
@@ -183,14 +183,16 @@ class YHAIRobotChatViewController: YHBaseViewController {
self
.
tableView
.
reloadData
()
if
canTriggerProgrammaticScroll
()
{
return
}
DispatchQueue
.
main
.
async
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
if
disableScrollToBottom
{
return
}
// 使用 UIView.animate 实现更丝滑的滚动效果
UIView
.
animate
(
withDuration
:
0.5
,
delay
:
0
,
...
...
@@ -304,7 +306,9 @@ class YHAIRobotChatViewController: YHBaseViewController {
}
callBack
:
{
self
.
manager
.
clearLobalSubRobotConversationIdForListItemId
(
"
\(
self
.
listItemId
)
"
)
YHHUD
.
flash
(
message
:
"删除历史记录中..."
)
self
.
viewModel
.
requestConversationId
{
sessionId
in
YHHUD
.
hide
()
if
!
sessionId
.
isEmpty
{
self
.
conversationId
=
sessionId
self
.
manager
.
saveLobalSubRobotConversationId
(
sessionId
,
listItemId
:
"
\(
self
.
listItemId
)
"
)
...
...
@@ -549,6 +553,7 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
}
func
scrollViewWillBeginDragging
(
_
scrollView
:
UIScrollView
)
{
printLog
(
"DisableScrollToBottom"
)
disableScrollToBottom
=
true
self
.
bottomInputView
.
showKeyBoard
(
false
)
}
...
...
@@ -561,11 +566,6 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
func
scrollViewDidEndDecelerating
(
_
scrollView
:
UIScrollView
)
{
}
// 检查是否可以执行代码触发的滚动
func
canTriggerProgrammaticScroll
()
->
Bool
{
return
!
disableScrollToBottom
}
}
extension
YHAIRobotChatViewController
:
JXSegmentedListContainerViewListDelegate
{
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIServiceListViewController.swift
View file @
42a898b1
...
...
@@ -207,7 +207,8 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
headerView
.
updateGreetingText
()
return
headerView
}
return
UICollectionReusableView
()
return
UICollectionReusableView
(
frame
:
CGRectMake
(
0
,
0
,
KScreenWidth
,
42.0
))
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
referenceSizeForHeaderInSection
:
Int
)
->
CGSize
{
...
...
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