initHourRankList UI调整

This commit is contained in:
ningwenqiang 2024-10-22 17:10:08 +08:00
parent 3ddcc944c0
commit 5c369f7215
11 changed files with 155 additions and 66 deletions

View File

@ -1,4 +1,4 @@
# The proguard configuration file for the following section is D:\AndroidProject\pandorapan\app\build\intermediates\default_proguard_files\global\proguard-android.txt-8.3.1
# The proguard configuration file for the following section is D:\AndroidProject\pandorapanP\app\build\intermediates\default_proguard_files\global\proguard-android.txt-8.3.1
# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
#
@ -95,8 +95,8 @@
# These classes are duplicated between android.jar and core-lambda-stubs.jar.
-dontnote java.lang.invoke.**
# End of content from D:\AndroidProject\pandorapan\app\build\intermediates\default_proguard_files\global\proguard-android.txt-8.3.1
# The proguard configuration file for the following section is D:\AndroidProject\pandorapan\app\proguard-rules.pro
# End of content from D:\AndroidProject\pandorapanP\app\build\intermediates\default_proguard_files\global\proguard-android.txt-8.3.1
# The proguard configuration file for the following section is D:\AndroidProject\pandorapanP\app\proguard-rules.pro
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/macpro/Library/Android/sdk/tools/proguard/proguard-android.txt
@ -420,8 +420,8 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
-ignorewarnings
# End of content from D:\AndroidProject\pandorapan\app\proguard-rules.pro
# The proguard configuration file for the following section is D:\AndroidProject\pandorapan\app\build\intermediates\aapt_proguard_file\link_onlineRelease\processLink_onlineReleaseResources\aapt_rules.txt
# End of content from D:\AndroidProject\pandorapanP\app\proguard-rules.pro
# The proguard configuration file for the following section is D:\AndroidProject\pandorapanP\app\build\intermediates\aapt_proguard_file\link_onlineRelease\processLink_onlineReleaseResources\aapt_rules.txt
-keep class androidx.core.app.CoreComponentFactory { <init>(); }
-keep class androidx.core.content.FileProvider { <init>(); }
-keep class androidx.core.content.FileProvider4Utils { <init>(); }
@ -1094,10 +1094,10 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
-keepclassmembers class * { *** videoEditClick(android.view.View); }
# End of content from D:\AndroidProject\pandorapan\app\build\intermediates\aapt_proguard_file\link_onlineRelease\processLink_onlineReleaseResources\aapt_rules.txt
# The proguard configuration file for the following section is D:\AndroidProject\pandorapan\lib_faceunity\build\intermediates\consumer_proguard_dir\link_onlineRelease\exportLink_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# End of content from D:\AndroidProject\pandorapanP\app\build\intermediates\aapt_proguard_file\link_onlineRelease\processLink_onlineReleaseResources\aapt_rules.txt
# The proguard configuration file for the following section is D:\AndroidProject\pandorapanP\lib_faceunity\build\intermediates\consumer_proguard_dir\link_onlineRelease\exportLink_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# End of content from D:\AndroidProject\pandorapan\lib_faceunity\build\intermediates\consumer_proguard_dir\link_onlineRelease\exportLink_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# End of content from D:\AndroidProject\pandorapanP\lib_faceunity\build\intermediates\consumer_proguard_dir\link_onlineRelease\exportLink_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# The proguard configuration file for the following section is C:\Users\CVB88\.gradle\caches\transforms-3\8d3e3177c15403546de73d87508067d6\transformed\jetified-XPopup-2.10.0\proguard.txt
# Generated keep rule for Lifecycle observer adapter.
-if class com.lxj.xpopup.core.BasePopupView {
@ -1157,9 +1157,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
# End of content from C:\Users\CVB88\.gradle\caches\transforms-3\a1df9a6aa192455030f7c9970b70e0e9\transformed\material-1.4.0\proguard.txt
# The proguard configuration file for the following section is D:\AndroidProject\pandorapan\lib_google\build\intermediates\consumer_proguard_dir\link_onlineRelease\exportLink_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# The proguard configuration file for the following section is D:\AndroidProject\pandorapanP\lib_google\build\intermediates\consumer_proguard_dir\link_onlineRelease\exportLink_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# End of content from D:\AndroidProject\pandorapan\lib_google\build\intermediates\consumer_proguard_dir\link_onlineRelease\exportLink_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# End of content from D:\AndroidProject\pandorapanP\lib_google\build\intermediates\consumer_proguard_dir\link_onlineRelease\exportLink_onlineReleaseConsumerProguardFiles\lib0\proguard.txt
# The proguard configuration file for the following section is C:\Users\CVB88\.gradle\caches\transforms-3\2929985d9627ba3bb45a0ebd18eaf9d3\transformed\jetified-linesdk-5.0.1\proguard.txt
-keepattributes *Annotation*
@ -1510,9 +1510,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
public boolean isLayoutSuppressed();
}
# End of content from C:\Users\CVB88\.gradle\caches\transforms-3\e9de7db2640f13ae2ab2a585dfd19337\transformed\recyclerview-1.2.1\proguard.txt
# The proguard configuration file for the following section is D:\AndroidProject\pandorapan\TabLayout\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
# The proguard configuration file for the following section is D:\AndroidProject\pandorapanP\TabLayout\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
# End of content from D:\AndroidProject\pandorapan\TabLayout\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
# End of content from D:\AndroidProject\pandorapanP\TabLayout\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
# The proguard configuration file for the following section is C:\Users\CVB88\.gradle\caches\transforms-3\bb5ec4ef561b90312eb1ca52da1f144d\transformed\jetified-facebook-applinks-15.2.0\proguard.txt
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

View File

@ -1,5 +1,7 @@
package com.yunbao.common.bean;
import android.util.Log;
import com.google.gson.annotations.SerializedName;
public class NewPeopleTaskModel extends BaseModel {
@ -10,9 +12,12 @@ public class NewPeopleTaskModel extends BaseModel {
private GiftModel gift = new GiftModel();
@SerializedName("reward_all")
private RewardAllModel rewardAll = new RewardAllModel();
@SerializedName("reward_one")
private RewardAllModel rewardOne = new RewardAllModel();
@SerializedName("is_free_gift")
private String isFreeGift = "1";
public TaskModel getTask() {
return task;
}
@ -22,6 +27,20 @@ public class NewPeopleTaskModel extends BaseModel {
return this;
}
public String getIsFreeGift() {
return isFreeGift;
}
public void setIsFreeGift(String isFreeGift) {
this.isFreeGift = isFreeGift;
}
public boolean hasFreeGift(){
Log.i("hasFreeGift",isFreeGift);
return isFreeGift.equals("0");
}
public GiftModel getGift() {
return gift;
}

View File

@ -0,0 +1,37 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class SendFreeGiftBean extends BaseModel{
//"code":0,"msg":"","info":[]},"msg":""
@SerializedName("code")
private int code;
@SerializedName("msg")
private String msg;
@SerializedName("info")
private String info;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
}

View File

@ -625,6 +625,17 @@ public class LiveHttpUtil {
.execute(callback);
}
/**
* 完成新手任務
*/
public static void setFrontTaskNew(String liveuid, HttpCallback callback) {
HttpClient.getInstance().get("tasknew.sendFreeGift", "tasknew.sendFreeGift")
.params("liveuid", liveuid)
.params("token", true)
.params("uid", true)
.execute(callback);
}
/**
* 修改心愿单列表
*/

View File

@ -215,6 +215,15 @@ public interface PDLiveApi {
@GET("/api/public/?service=Live.getHourChartRank")
Observable<ResponseModel<List<HourRank>>> getHourChartRank(@Query("liveuid") String liveuid);
/**
* 小时榜接口
*
* @param liveuid 直播间id
*/
@GET("/api/public/?service=Tasknew.sendFreeGift")
Observable<ResponseModel<SendFreeGiftBean>> sendFreeGift(@Query("liveuid") String liveuid);
/**
* 清除系统消息的未读数
*/

View File

@ -4,7 +4,7 @@ ext {
buildToolsVersion: "29.0.2",
minSdkVersion : 23,
targetSdkVersion : 34,
versionCode : 561,
versionCode : 607,
versionName : "6.8.3",
namespace : "com.pandoralive.shayu"
]
@ -12,7 +12,7 @@ ext {
//
serverHost : "https://napi.yaoulive.com",
//
testServerHost : "https://ceshi.yaoulive.com",
testServerHost : "https://ceshi.yaoulive.com", // https://ceshi.yaoulive.com https://ceshi.poyoshow.com
buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")),
//

View File

@ -61,6 +61,7 @@ import com.yunbao.common.event.GiftNumberEvent;
import com.yunbao.common.event.LiveGiftDialogEvent;
import com.yunbao.common.event.SendBlindGiftEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.API;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.http.LiveHttpUtil;
@ -108,6 +109,9 @@ import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
/**
* 直播间新送礼弹窗
*/
@ -380,14 +384,14 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
}
if (number == 0) {
iterator.remove();
}else {
} else {
bean.setChecked(false);
}
}
if (mWrapGiftList != null && !mWrapGiftList.isEmpty()) {
//mWrapGiftList.get(0).setChecked(true);
mFrameGiftNewAdapter = new FrameGiftNewAdapter(mWrapGiftList, mStream, mLiveUid, "",true);
mFrameGiftNewAdapter = new FrameGiftNewAdapter(mWrapGiftList, mStream, mLiveUid, "", true);
giftRecyclerView.setAdapter(mFrameGiftNewAdapter);
emptyGroup.setVisibility(View.GONE);
// mWrapGiftList.get(0).setChecked(true);
@ -419,7 +423,7 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
ViewClicksAntiShake.clicksAntiShake(liveGiftSend, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if(!liveGiftSend.isSelected()){
if (!liveGiftSend.isSelected()) {
return;
}
MobclickAgent.onEvent(mContext, "gif_list_seed_gif", "用户送礼物");
@ -539,7 +543,7 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
ViewClicksAntiShake.clicksAntiShake(giftSendBgV, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (liveGiftModel.getType() == 7 ) return;
if (liveGiftModel.getType() == 7) return;
new XPopup.Builder(getContext())
.enableDrag(false)
.asCustom(new GiftNumberPopup(getContext()))
@ -750,19 +754,14 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
}
if (liveGiftModel.getTag() != null) {
if (mCount.equals("1")) {
LiveHttpUtil.setFrontTask("sendgift", mLiveUid, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
API.get().pdLiveApi(mContext).sendFreeGift(mLiveUid).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(listResponseModel -> {
EventBus.getDefault().post("stop_svga_new_user_gif");
EventBus.getDefault().post("stop_new_user_gif");
if (code == 0) {
if (listResponseModel.getData() != null && listResponseModel.getData().getCode() == 0) {
EventBus.getDefault().post("stop_new_user_gif1");
}
dismiss();
}
});
} else {
ToastUtil.show(mContext.getString(com.yunbao.live.R.string.only_one));
}, Throwable::printStackTrace).isDisposed();
}
} else {
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || liveGiftModel == null) {

View File

@ -210,14 +210,14 @@ public class SocketRyChatUtil {
}
});
LiveHttpUtil.setFrontTask("illumine", new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0) {
EventBus.getDefault().post("stop_svga_new_user_double1");
}
}
});
// LiveHttpUtil.setFrontTask("illumine", new HttpCallback() {
// @Override
// public void onSuccess(int code, String msg, String[] info) {
// if (code == 0) {
// EventBus.getDefault().post("stop_svga_new_user_double1");
// }
// }
// });
if (SocketRyClient.mSocketHandler != null)
SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
}

View File

@ -210,14 +210,14 @@ public class SocketSwChatUtil {
}
});
LiveHttpUtil.setFrontTask("illumine", new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0) {
EventBus.getDefault().post("stop_svga_new_user_double1");
}
}
});
// LiveHttpUtil.setFrontTask("illumine", new HttpCallback() {
// @Override
// public void onSuccess(int code, String msg, String[] info) {
// if (code == 0) {
// EventBus.getDefault().post("stop_svga_new_user_double1");
// }
// }
// });
if (SocketSwClient.mSocketHandler != null)
SocketSwClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
}

View File

@ -554,7 +554,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Subscribe(threadMode = ThreadMode.MAIN)
public void onUpdata(String str) {
if ("svga_new_user_gif".equals(str)) {
svga_new_user_gif();
// svga_new_user_gif();
} else if ("svga_new_user_double".equals(str)) {
svga_new_user_double();
} else if ("svga_new_user_follow".equals(str)) {
@ -4832,15 +4832,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
EventBus.getDefault().post("stop_svga_new_user_follow");
LiveHttpUtil.setFrontTask("attent", new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0) {
isAttention = 1;
EventBus.getDefault().post("stop_svga_new_user_follow1");
}
}
});
// LiveHttpUtil.setFrontTask("attent", new HttpCallback() {
// @Override
// public void onSuccess(int code, String msg, String[] info) {
// if (code == 0) {
// isAttention = 1;
// EventBus.getDefault().post("stop_svga_new_user_follow1");
// }
// }
// });
if (TextUtils.isEmpty(mLiveUid)) {
return;
@ -5836,6 +5836,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void configBanner3(NewPeopleTaskModel newPeopleTask) {
TaskModel taskModel = newPeopleTask.getTask();
if (newPeopleTask.hasFreeGift()) {
IMLoginManager.get(mContext).setNewUserGif(true);
svga_new_user_gif();
EventBus.getDefault().post("svga_new_user_gif");
}else {
IMLoginManager.get(mContext).setNewUserGif(false);
}
if (taskModel != null) {
GiftModel giftModel = newPeopleTask.getGift();
if (giftModel != null) {
@ -5850,15 +5858,21 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
bean1.setName(giftModel.getGiftname());
bean1.setTag("1");
bean1.setPrice(WordUtil.isNewZh() ? "免费" : "free");
if (!IMLoginManager.get(mContext).isisNewUserOne()) {
if (TextUtils.equals(taskModel.getSendgift(), "0")) {
IMLoginManager.get(mContext).setNewUserGif(true);
EventBus.getDefault().post("svga_new_user_gif");
}
}
// if (!IMLoginManager.get(mContext).isisNewUserOne()) {
//
// }
// if (newPeopleTask.hasFreeGift()) {
// IMLoginManager.get(mContext).setNewUserGif(true);
// svga_new_user_gif();
// EventBus.getDefault().post("svga_new_user_gif");
// }else {
// IMLoginManager.get(mContext).setNewUserGif(false);
// }
BannerBean banner3Bean = new BannerBean();
banner3Bean.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png");
banner3Bean.setLink(taskModel.getSendgift());
banner3Bean.setLink(newPeopleTask.getIsFreeGift());
mBannerList3.add(banner3Bean);
@ -5872,7 +5886,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
banner3Bean2.setLink(taskModel.getIllumine());
mBannerList3.add(banner3Bean2);
if (TextUtils.equals(taskModel.getSendgift(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
if (newPeopleTask.hasFreeGift() && !IMLoginManager.get(mContext).isisNewUserOne()) {
showBanner3(bean1);
} else if (TextUtils.equals(taskModel.getAttent(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
showBanner3(bean1);

View File

@ -924,7 +924,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.firstLookLiveNotify();
}
//判断是否有免费礼物
if("0".equals(data.getNewPeopleTask().getTask().getSendgift())){
if(data.getNewPeopleTask().hasFreeGift()){
mLiveRoomViewHolder.firstLook5MinLiveNotify();
}
//观看200秒之后推送活动入口im消息