Commit 5077ff44 by 范玉宾

Merge branch 'feat/lancet/review_2.0' of…

Merge branch 'feat/lancet/review_2.0' of http://gitlab.yidianling.com/app_android_lib/YDL-Component into feat/lancet/review_2.0

* 'feat/lancet/review_2.0' of http://gitlab.yidianling.com/app_android_lib/YDL-Component:
  remove share to trend when in comment list
  update confide module  version
  commentList  share  done

# Conflicts:
#	m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
parents a8e1526b 026b68f6
......@@ -5,10 +5,10 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.50.41",
"m-confide" : "0.0.50.44",
"m-consultant" : "0.0.60.68",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.59",
"m-user" : "0.0.62.68",
"m-home" : "0.0.23.95",
"m-im" : "0.0.21.64",
"m-dynamic" : "0.0.7.74",
......@@ -23,10 +23,10 @@ ext {
//mdt 组件
"ydl-tuicore" : "0.0.25",
//第一步
"ydl-platform" : "0.0.41.44",
"ydl-platform" : "0.0.41.48",
//第二步 若干
"ydl-webview" : "0.0.38.96",
"ydl-webview" : "0.0.38.99",
"ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.21",
"m-audioim" : "0.0.49.30.23",
......@@ -91,10 +91,10 @@ ext {
ydlCompileVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.50.41",
"m-confide" : "0.0.50.44",
"m-consultant" : "0.0.60.68",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.59",
"m-user" : "0.0.62.68",
"m-home" : "0.0.23.95",
"m-im" : "0.0.21.64",
"m-dynamic" : "0.0.7.74",
......@@ -110,10 +110,10 @@ ext {
//mdt 组件
"ydl-tuicore" : "0.0.25",
//第一步
"ydl-platform" : "0.0.41.44",
"ydl-platform" : "0.0.41.48",
//第二步 若干
"ydl-webview" : "0.0.38.96",
"ydl-webview" : "0.0.38.99",
"ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.21",
"m-audioim" : "0.0.49.30.23",
......
......@@ -235,10 +235,9 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
} else {
iv_order_tip.visibility = View.GONE
getLocal().setConfide(false)
getLocal().setConsult(false)
model.show.postValue(false)
}
}else{
getLocal().setConfide(false)
......
......@@ -55,7 +55,7 @@ internal class AppLocalImpl private constructor(): AppLocal {
}
override fun setConsult(have: Boolean) {
getAppSP().edit().putBoolean(CONSULT, false).apply()
getAppSP().edit().putBoolean(CONSULT, have).apply()
}
override fun getConfide(): Boolean {
......
......@@ -17,6 +17,8 @@ class ShareData : Serializable {
// just for Meditation
var type:String? = null
var isDarkMode = false
// 兼容评价列表分享H5传参数据结构
var imageBase64:String?=null
//分享到动态url
var url: String? = null
......
......@@ -73,6 +73,8 @@ class ShareMeditationDialog : DialogFragment() {
val shareTitle = arguments?.getString(KEY_SHARE_TITLE)
val shareContent = arguments?.getString(KEY_SHARE_CONTENT)
val shareCover = arguments?.getString(KEY_SHARE_COVER)
val miniId = arguments?.getString(KEY_SHARE_MINI_ID)
val miniPath = arguments?.getString(KEY_SHARE_MINI_PATH)
llRootLayout = view?.findViewById(R.id.csl_share_layout)
......@@ -96,13 +98,15 @@ class ShareMeditationDialog : DialogFragment() {
updateUI(isDarkMode == true)
llWeChat?.setOnClickListener {
ShareUtils.shareTo(
SHARE_MEDIA.WEIXIN,
ShareUtils.shareSmailWeixin(
activity as Activity,
shareTitle!!,
shareUrl!!,
shareContent!!,
shareCover!!
shareCover!!,
path = miniPath,
id = miniId,
shareListener = null
)
dismiss()
}
......@@ -191,15 +195,19 @@ class ShareMeditationDialog : DialogFragment() {
private const val KEY_SHARE_TITLE = "key_share_title"
private const val KEY_SHARE_CONTENT = "key_share_content"
private const val KEY_SHARE_COVER = "key_share_cover"
private const val KEY_SHARE_MINI_ID = "key_share_mini_id"
private const val KEY_SHARE_MINI_PATH = "key_share_mini_path"
fun newInstance(isDarkMode: Boolean,shareUrl:String,shareTitle:String,
shareContent:String,shareCover:String): ShareMeditationDialog {
shareContent:String,shareCover:String,miniId:String,miniPath:String): ShareMeditationDialog {
val args = Bundle()
args.putBoolean(KEY_SHARE_DARK_MODE, isDarkMode)
args.putString(KEY_SHARE_URL, shareUrl)
args.putString(KEY_SHARE_TITLE, shareTitle)
args.putString(KEY_SHARE_CONTENT, shareContent)
args.putString(KEY_SHARE_COVER, shareCover)
args.putString(KEY_SHARE_MINI_ID,miniId )
args.putString(KEY_SHARE_MINI_PATH, miniPath)
val fragment = ShareMeditationDialog()
fragment.arguments = args
......
......@@ -41,6 +41,7 @@ import com.ydl.view.ShareMeditationDialog;
import com.ydl.ydl_router.manager.YDLRouterManager;
import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.base.BaseApp;
import com.ydl.ydlcommon.bean.ShareData;
import com.ydl.ydlcommon.bean.StatusBarOptions;
import com.ydl.ydlcommon.event.MeditationEvent;
import com.ydl.ydlcommon.modular.ModularServiceManager;
......@@ -118,6 +119,11 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
protected String shareTitle;
protected String shareDesc;
private String cover;
private String miniId;
private String miniPath;
// 评价2.0新增字段 区分评价列表
private H5JsBean.H5JsCmd.Params paramsForCommentList;
private boolean isShareCommentList;
private boolean isDarkMode = false;
......@@ -521,6 +527,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
shareTitle = params.getShare().getTitle();
shareDesc = params.getShare().getDesc();
cover = params.getShare().getCover();
paramsForCommentList = params;
LogUtil.d("title: " + shareTitle + " url: " + shareUrl + " desc: " + shareDesc + " cover: " + cover);
new Handler(getMainLooper()).post(() -> initShareMenu());
}
......@@ -538,18 +545,17 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
shareTitle = params.getShare().getTitle();
shareDesc = params.getShare().getDesc();
cover = params.getShare().getCover();
miniId = params.getShare().getMinProgramId();
miniPath = params.getShare().getMinProgramPath();
isDarkMode = params.getShare().isDarkMode();
if(shareMeditationDialog == null){
shareMeditationDialog = ShareMeditationDialog.Companion.newInstance(isDarkMode,
shareUrl,shareTitle,shareDesc,cover);
shareUrl,shareTitle,shareDesc,cover,miniId,miniPath);
}
if (shareMeditationDialog!=null && !shareMeditationDialog.isAdded()){
shareMeditationDialog.show(getSupportFragmentManager(),"share_meditation");
}
}else {
if ("commentList".equals(params.getShare().getType())) {
ActionCountUtils.Companion.baiDuCountSign3("experts_comment_list_page", "comment_share_click", "", "", "");
}
purl = params.getShare().getUrl();
shareUrl = params.getShare().getShare_url();
shareTitle = params.getShare().getTitle();
......@@ -1051,7 +1057,14 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private void initShareMenu() {
tb_title.setRightIcon(getResources().getDrawable(R.drawable.web_common_share));
tb_title.setOnRightTextClick((view, isActive) -> {
ShareData shareData = paramsForCommentList.getShare();
if (shareData!=null && "commentList".equals(shareData.getType())){
isShareCommentList = true;
ActionCountUtils.Companion.baiDuCountSign3("experts_comment_list_page", "comment_share_click", "", "", "");
share(shareData.getImageBase64(),paramsForCommentList);
}else {
share(null, null);
}
});
LogUtil.d("setSeccessful");
}
......@@ -1444,9 +1457,13 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
//如果未引入动态模块的话,隐藏分享至动态按钮
dialog = YDLShareDialog.Companion.style4(this, shareTitle, shareUrl, shareDesc, cover);
} else {
if (isShareCommentList){
dialog = YDLShareDialog.Companion.style7(this, shareTitle, shareUrl, shareDesc, cover, minPath, minId);
}else {
dialog = YDLShareDialog.Companion.style1(this, shareTitle, shareUrl, shareDesc, cover, minPath, minId);
}
}
}
dialog.setCallBack(type -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment