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
e747a779
Commit
e747a779
authored
Dec 12, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
4cbb34a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
YHAIMainChatViewController.swift
...s/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
+12
-0
YHAIRobotChatViewController.swift
.../AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
+12
-0
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
View file @
e747a779
...
@@ -366,6 +366,18 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
...
@@ -366,6 +366,18 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
return
height
return
height
}
}
if
msgType
==
.
recommendText
{
// 推荐文字消息
let
label
=
UILabel
()
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
12
)
label
.
numberOfLines
=
0
label
.
text
=
message
.
body
.
contentText
let
maxWidth
=
KScreenWidth
-
20*
2
-
16*
2
// 最大宽度限制
let
size
=
label
.
sizeThatFits
(
CGSize
(
width
:
maxWidth
,
height
:
.
greatestFiniteMagnitude
))
var
textHeight
=
ceil
(
size
.
height
)
return
textHeight
+
10.0
*
3.0
}
if
msgType
!=
.
text
{
if
msgType
!=
.
text
{
return
UITableView
.
automaticDimension
return
UITableView
.
automaticDimension
}
}
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
View file @
e747a779
...
@@ -508,6 +508,18 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
...
@@ -508,6 +508,18 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
return
height
return
height
}
}
if
msgType
==
.
recommendText
{
// 推荐文字消息
let
label
=
UILabel
()
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
12
)
label
.
numberOfLines
=
0
label
.
text
=
message
.
body
.
contentText
let
maxWidth
=
KScreenWidth
-
20*
2
-
16*
2
// 最大宽度限制
let
size
=
label
.
sizeThatFits
(
CGSize
(
width
:
maxWidth
,
height
:
.
greatestFiniteMagnitude
))
var
textHeight
=
ceil
(
size
.
height
)
return
textHeight
+
10.0
*
3.0
}
if
msgType
!=
.
text
{
if
msgType
!=
.
text
{
return
UITableView
.
automaticDimension
return
UITableView
.
automaticDimension
}
}
...
...
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