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
cb5eb26f
Commit
cb5eb26f
authored
3 years ago
by
范玉宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix time off reset fail
parent
33f5c1d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
config.gradle
config.gradle
+4
-4
PlayMeditationActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
+10
-11
No files found.
config.gradle
View file @
cb5eb26f
...
...
@@ -9,12 +9,12 @@ ext {
"m-consultant"
:
"0.0.60.25"
,
"m-fm"
:
"0.0.30.08"
,
"m-user"
:
"0.0.62.24"
,
"m-home"
:
"0.0.23.7
6
"
,
"m-home"
:
"0.0.23.7
7
"
,
"m-im"
:
"0.0.21.44"
,
"m-dynamic"
:
"0.0.7.73"
,
"m-article"
:
"0.0.0.10"
,
"m-muse"
:
"0.0.28.5
8
"
,
"m-muse"
:
"0.0.28.5
9
"
,
"m-tests"
:
"0.0.24.18"
,
"m-course"
:
"0.0.43.37"
,
...
...
@@ -94,12 +94,12 @@ ext {
"m-consultant"
:
"0.0.60.25"
,
"m-fm"
:
"0.0.30.08"
,
"m-user"
:
"0.0.62.24"
,
"m-home"
:
"0.0.23.7
6
"
,
"m-home"
:
"0.0.23.7
7
"
,
"m-im"
:
"0.0.21.44"
,
"m-dynamic"
:
"0.0.7.73"
,
"m-article"
:
"0.0.0.8"
,
"m-muse"
:
"0.0.28.5
8
"
,
"m-muse"
:
"0.0.28.5
9
"
,
"m-tests"
:
"0.0.24.18"
,
"m-course"
:
"0.0.43.37"
,
//-------------- 业务模块 API 层 --------------
...
...
This diff is collapsed.
Click to expand it.
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
View file @
cb5eb26f
...
...
@@ -20,7 +20,6 @@ import com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper.Companion.show
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.home.http.MuseHttp
import
com.yidianling.muse.R
...
...
@@ -36,8 +35,6 @@ import com.yidianling.user.api.service.IUserService
import
de.greenrobot.event.EventBus
import
io.reactivex.Observable
import
io.reactivex.Observer
import
io.reactivex.Scheduler
import
io.reactivex.Single
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.disposables.Disposable
import
io.reactivex.functions.Consumer
...
...
@@ -47,7 +44,6 @@ import kotlinx.android.synthetic.main.activity_play_meditation.iv_close
import
kotlinx.android.synthetic.main.activity_play_meditation.tv_title
import
kotlinx.android.synthetic.main.layout_meditation_play_float_view.*
import
kotlinx.android.synthetic.main.player_control_view.*
import
org.reactivestreams.Subscription
import
java.util.*
import
java.util.concurrent.TimeUnit
import
kotlin.math.roundToInt
...
...
@@ -595,7 +591,7 @@ class PlayMeditationActivity : BaseActivity() {
val
currentPosition
=
meditation
.
broadcastTime
mStatus
=
meditation
.
status
updateUI
()
updateUI
(
needRefresh
=
false
)
initMediaPlayer
(
mMediaUrl
,
currentPosition
,
mMediaIdFromLocal
==
mMediaId
)
}
else
{
...
...
@@ -859,7 +855,7 @@ class PlayMeditationActivity : BaseActivity() {
}
}
private
fun
updateUI
(){
private
fun
updateUI
(
needRefresh
:
Boolean
=
true
){
tv_title
.
text
=
mTitle
tv_content
.
text
=
mDesc
Glide
.
with
(
this
)
...
...
@@ -874,12 +870,15 @@ class PlayMeditationActivity : BaseActivity() {
}
)
if
(
MediaPlayerManager
.
getInstance
(
this
)
?.
getTimeOffStatus
()
==
true
){
val
timeOff
=
MediaPlayerManager
.
getInstance
(
this
)
?.
getTimeOff
()
if
(
timeOff
!=
null
&&
timeOff
>
0
&&
mMeditationType
!=
null
){
initRxTimeOff
(
timeOff
,
mMeditationType
!!
)
if
(
needRefresh
){
if
(
MediaPlayerManager
.
getInstance
(
this
)
?.
getTimeOffStatus
()
==
true
){
val
timeOff
=
MediaPlayerManager
.
getInstance
(
this
)
?.
getTimeOff
()
if
(
timeOff
!=
null
&&
timeOff
>
0
&&
mMeditationType
!=
null
){
initRxTimeOff
(
timeOff
,
mMeditationType
!!
)
}
}
}
}
private
fun
initRxTimeOff
(
time
:
Long
,
meditationType
:
Int
)
{
...
...
@@ -943,7 +942,7 @@ class PlayMeditationActivity : BaseActivity() {
mStatus
=
event
.
status
updateUI
()
updateUI
(
needRefresh
=
false
)
if
(
event
.
mediaUrl
==
MediaPlayerManager
.
getInstance
(
this
)
?.
getAudioPath
())
{
return
...
...
This diff is collapsed.
Click to expand it.
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