| | |
| | | }) |
| | | |
| | | tv_action.setOnClickListener { |
| | | //存音量 |
| | | SPUtils.instance().put(Const.User.VOLUME,sb_voice.progress).apply() |
| | | if (list.isNotEmpty()){ //存bgm和bg |
| | | SPUtils.instance().put(Const.User.BG,list[banner_landscape.currentItem].imageUrl) |
| | | .put(Const.User.BGM,list[banner_landscape.currentItem].audioFile).apply() |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.CHANGE_BGM)) |
| | | tv_action.isEnabled = false |
| | | HttpManager.saveUserHomeBackgroundMusic(list[banner_landscape.currentItem].id).request(this,success = {_,_-> |
| | | //存音量 |
| | | SPUtils.instance().put(Const.User.VOLUME,sb_voice.progress).apply() |
| | | SPUtils.instance().put(Const.User.BG,list[banner_landscape.currentItem].imageUrl) |
| | | .put(Const.User.BGM,list[banner_landscape.currentItem].audioFile).apply() |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.CHANGE_BGM)) |
| | | toast("保存成功") |
| | | startActivity<MainActivity>() |
| | | }){_,_-> |
| | | tv_action.isEnabled = true |
| | | } |
| | | } |
| | | toast("保存成功") |
| | | startActivity<MainActivity>() |
| | | if (fromPrivacy) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.FINISH_GUIDE_AUDIO)) |
| | | } |