fix bugs.71
This commit is contained in:
@@ -66,9 +66,14 @@ open class Application : CommonAppContext() {
|
||||
initCrashUtils()
|
||||
initSmartRefreshLayout()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun bgToForeground() {
|
||||
AppUtils.registerAppStatusChangedListener(object : Utils.OnAppStatusChangedListener {
|
||||
override fun onForeground(activity: Activity?) {//应用切换到前台
|
||||
if (!CommonAppContext.getInstance().isPlaying && activity is MainActivity) {
|
||||
if (!CommonAppContext.getInstance().isPlaying) {
|
||||
RetrofitClient.getInstance()
|
||||
.index_recommend_room(object : BaseObserver<IndexRecommendRoom>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
|
||||
Reference in New Issue
Block a user