Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
ed8da38c
Commit
ed8da38c
authored
Jan 24, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 去掉测试重复时间代码
parent
3b3155e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
36 deletions
+41
-36
config.gradle
config.gradle
+2
-2
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+39
-34
No files found.
config.gradle
View file @
ed8da38c
...
...
@@ -12,7 +12,7 @@ ext {
"m-user-medical"
:
"0.0.61.90"
,
"m-home"
:
"0.0.22.70"
,
"m-im"
:
"0.0.20.76"
,
"m-im-medical"
:
"0.0.20.
79
"
,
"m-im-medical"
:
"0.0.20.
81
"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -98,7 +98,7 @@ ext {
"m-user-medical"
:
"0.0.61.90"
,
"m-home"
:
"0.0.22.70"
,
"m-im"
:
"0.0.20.76"
,
"m-im-medical"
:
"0.0.20.
79
"
,
"m-im-medical"
:
"0.0.20.
81
"
,
"m-dynamic"
:
"0.0.7.28"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
ed8da38c
...
...
@@ -523,43 +523,48 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if
(!
TextUtils
.
isEmpty
(
statusName
))
{
tv_receive_undiagnosis
.
setText
(
statusName
);
}
timer
=
new
CountDownTimer
(
time
*
1000
,
1
)
{
@Override
public
void
onTick
(
long
millisUntilFinished
)
{
//单位时
long
hour
=
millisUntilFinished
/
(
1000
*
60
*
60
);
//单位分
long
minute
=
(
millisUntilFinished
-
hour
*
(
1000
*
60
*
60
))
/
(
1000
*
60
);
//单位秒
long
second
=
(
millisUntilFinished
-
hour
*
(
1000
*
60
*
60
)
-
minute
*
(
1000
*
60
))
/
1000
;
String
timeStr
=
""
;
if
(
hour
!=
0
)
{
timeStr
=
hour
+
"小时"
+
minute
+
"分"
+
second
+
"秒"
;
}
else
if
(
hour
==
0
&&
minute
!=
0
)
{
timeStr
=
minute
+
"分"
+
second
+
"秒"
;
}
else
if
(
hour
==
0
&&
minute
==
0
&&
second
!=
0
)
{
timeStr
=
second
+
"秒"
;
}
if
(!
TextUtils
.
isEmpty
(
timeStr
)){
String
timeEnd
=
"后问诊结束"
;
SpannableStringBuilder
spannable
=
new
SpannableStringBuilder
(
timeStr
+
timeEnd
);
spannable
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#007AFF"
)),
0
,
timeStr
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
time_count_down
.
setText
(
spannable
);
}
else
{
time_count_down
.
setText
(
""
);
if
(
timer
!=
null
){
timer
.
cancel
();
}
else
{
timer
=
new
CountDownTimer
(
time
*
1000
,
1
)
{
@Override
public
void
onTick
(
long
millisUntilFinished
)
{
//单位时
long
hour
=
millisUntilFinished
/
(
1000
*
60
*
60
);
//单位分
long
minute
=
(
millisUntilFinished
-
hour
*
(
1000
*
60
*
60
))
/
(
1000
*
60
);
//单位秒
long
second
=
(
millisUntilFinished
-
hour
*
(
1000
*
60
*
60
)
-
minute
*
(
1000
*
60
))
/
1000
;
String
timeStr
=
""
;
if
(
hour
!=
0
)
{
timeStr
=
hour
+
"小时"
+
minute
+
"分"
+
second
+
"秒"
;
}
else
if
(
hour
==
0
&&
minute
!=
0
)
{
timeStr
=
minute
+
"分"
+
second
+
"秒"
;
}
else
if
(
hour
==
0
&&
minute
==
0
&&
second
!=
0
)
{
timeStr
=
second
+
"秒"
;
}
if
(!
TextUtils
.
isEmpty
(
timeStr
)){
String
timeEnd
=
"后问诊结束"
;
SpannableStringBuilder
spannable
=
new
SpannableStringBuilder
(
timeStr
+
timeEnd
);
spannable
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#007AFF"
)),
0
,
timeStr
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
time_count_down
.
setText
(
spannable
);
}
else
{
time_count_down
.
setText
(
""
);
}
}
}
@Override
public
void
onFinish
()
{
@Override
public
void
onFinish
()
{
}
};
}
}
};
timer
.
start
();
}
else
if
(
type
==
20
)
{
...
...
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