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
6ff42b8a
Commit
6ff42b8a
authored
Dec 12, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
242e1916
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
YHAIMainChatViewController.swift
...s/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
+3
-1
YHAIRobotChatViewController.swift
.../AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
+3
-1
YHAITextMessageCell.swift
.../Modules/AI/AI-Dialogue(AI对话)/V/YHAITextMessageCell.swift
+3
-7
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
View file @
6ff42b8a
...
...
@@ -383,6 +383,8 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
return
UITableView
.
automaticDimension
}
// 以下是文字消息计算高度
let
label
=
UILabel
()
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
...
...
@@ -398,7 +400,7 @@ extension YHAIMainChatViewController: UITableViewDelegate, UITableViewDataSource
)
label
.
attributedText
=
attributedText
let
maxWidth
=
KScreenWidth
-
20*
2
-
16*
2
// 最大宽度限制
let
maxWidth
=
message
.
isSelf
?
KScreenWidth
-
58
-
20
-
16*
2
:
KScreenWidth
-
20*
2
-
16*
2
// 最大宽度限制
let
size
=
label
.
sizeThatFits
(
CGSize
(
width
:
maxWidth
,
height
:
.
greatestFiniteMagnitude
))
var
textHeight
=
ceil
(
size
.
height
)
if
textHeight
<
20.0
{
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
View file @
6ff42b8a
...
...
@@ -517,6 +517,8 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
return
UITableView
.
automaticDimension
}
// 以下是文字消息计算高度
let
label
=
UILabel
()
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
...
...
@@ -532,7 +534,7 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
)
label
.
attributedText
=
attributedText
let
maxWidth
=
KScreenWidth
-
20*
2
-
16*
2
// 最大宽度限制
let
maxWidth
=
message
.
isSelf
?
KScreenWidth
-
58
-
20
-
16*
2
:
KScreenWidth
-
20*
2
-
16*
2
// 最大宽度限制
let
size
=
label
.
sizeThatFits
(
CGSize
(
width
:
maxWidth
,
height
:
.
greatestFiniteMagnitude
))
var
textHeight
=
ceil
(
size
.
height
)
if
textHeight
<
20.0
{
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHAITextMessageCell.swift
View file @
6ff42b8a
...
...
@@ -35,7 +35,7 @@ class YHAITextMessageCell: UITableViewCell {
if
message
.
isSelf
{
whiteContentView
.
backgroundColor
=
.
brandMainColor
whiteContentView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
greaterThanOrEqualTo
(
20
)
make
.
left
.
greaterThanOrEqualTo
(
58
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
16
)
make
.
bottom
.
equalTo
(
0
)
...
...
@@ -55,11 +55,7 @@ class YHAITextMessageCell: UITableViewCell {
whiteContentView
.
backgroundColor
=
.
white
whiteContentView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
if
message
.
getType
()
==
.
recommendText
{
make
.
right
.
lessThanOrEqualTo
(
-
20
)
}
else
{
make
.
right
.
equalTo
(
-
20
)
}
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
16
)
make
.
bottom
.
equalTo
(
0
)
}
...
...
@@ -170,7 +166,7 @@ class YHAITextMessageCell: UITableViewCell {
make
.
height
.
equalTo
(
37
)
make
.
width
.
equalTo
(
82
)
}
copyBtn
.
iconInLeft
(
spacing
:
0
.0
)
copyBtn
.
iconInLeft
(
spacing
:
2
.0
)
return
v
...
...
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