Merge remote-tracking branch 'origin/master'

This commit is contained in:
18142669586 2023-08-10 11:15:31 +08:00
commit 54a4c0b590
23 changed files with 115 additions and 87 deletions

View File

@ -16,6 +16,11 @@ import java.util.List;
public class GiftAlreadyWallAdapter extends RecyclerView.Adapter {
private List<GiftWallModel> giftWall = new ArrayList<>();
private boolean sbWy;//是否正在直播
public GiftAlreadyWallAdapter(boolean sbWy) {
this.sbWy = sbWy;
}
@NonNull
@Override
@ -27,7 +32,7 @@ public class GiftAlreadyWallAdapter extends RecyclerView.Adapter {
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
GiftAlreadyWallViewHolder withoutWallViewHolder = (GiftAlreadyWallViewHolder) holder;
withoutWallViewHolder.showData(giftWall.get(position));
withoutWallViewHolder.showData(giftWall.get(position), sbWy);
}
@Override

View File

@ -7,6 +7,7 @@ public class GiftWallItemEvent extends BaseModel {
private GiftWallModel giftWallModel;
private boolean unlit;
public GiftWallModel getGiftWallModel() {
return giftWallModel;
}

View File

@ -913,12 +913,14 @@ public interface PDLiveApi {
*/
@GET("/api/public/?service=Gift.getGiftGuide")
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuide(
@Query("liveuid") String liveUid
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
@GET("/api/public/?service=Gift.getGiftGuideHistory")
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuideHistory(
@Query("liveuid") String liveUid
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
@GET("/api/public/?service=Gift.getUserMedalList")

View File

@ -1984,9 +1984,9 @@ public class LiveNetManager {
}).isDisposed();
}
public void getGiftGuide(String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
public void getGiftGuide(String liveUid,String toUid ,HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext)
.getGiftGuide(liveUid)
.getGiftGuide(liveUid,toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
@ -2006,9 +2006,9 @@ public class LiveNetManager {
}).isDisposed();
}
public void getGiftGuideHistory(String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
public void getGiftGuideHistory(String toUid,String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext)
.getGiftGuideHistory(liveUid)
.getGiftGuideHistory(liveUid,toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {

View File

@ -25,7 +25,7 @@ public class GiftAlreadyWallViewHolder extends RecyclerView.ViewHolder {
giftNumber = itemView.findViewById(R.id.gift_number);
}
public void showData(GiftWallModel giftWallModel) {
public void showData(GiftWallModel giftWallModel,boolean sbWy) {
giftTitle.setText(giftWallModel.getGiftname());
giftNumber.setText("*" + giftWallModel.getGiftCountNumber());
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);

View File

@ -356,6 +356,7 @@
android:id="@+id/gift_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="10dp"
android:layout_marginStart="8dp" />
<ImageView

View File

@ -130,7 +130,7 @@
<TextView
android:id="@+id/gift_details_btn"
android:layout_width="100dp"
android:layout_height="28dp"
android:layout_height="24dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="23dp"
android:background="@drawable/background_skip_button"

View File

@ -956,7 +956,7 @@ Limited ride And limited avatar frame</string>
<string name="chat_chat">Chat</string>
<string name="lucky_angel">Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you!</string>
<string name="lucky_100">Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck!</string>
<string name="user_card_guard">Guardian group %s people</string>
<string name="user_card_guard">Guardian %s</string>
<string name="to_receive">receive</string>
<string name="to_complete">To complete</string>
<string name="already_collected">Already collected</string>
@ -1257,7 +1257,7 @@ Limited ride And limited avatar frame</string>
<string name="leveling_points">%s experience upgrade,%s receive rewards</string>
<string name="reach_the_top">You have reached the highest level!</string>
<string name="nothing_in_the_package_yet">There\'s nothing in the package yet</string>
<string name="custom_quantity">Custom quantity</string>
<string name="custom_quantity">Enter count</string>
<string name="gift_wall">Gift wall</string>
<string name="has_been_lit">Has been lit %s</string>
<string name="codex">Illustrated book</string>
@ -1282,10 +1282,10 @@ Limited ride And limited avatar frame</string>
<string name="gift_wall_entrance8_4">A rich party: When the price of a single gift received exceeds 50000 diamonds, it is sufficient Illuminate the achievement;</string>
<string name="gift_wall_entrance8_5">Very rich: When receiving 100 gifts priced over 3000 diamonds, i.e This achievement can be illuminated.</string>
<string name="gift_wall_entrance8_6">The current user has a total of 4 achievements, namely being rich and capricious, sharing rain and dew, and giving gifts Gift machines, lighting masters.</string>
<string name="gift_wall_entrance8_7">Rich and capricious: Accumulated gifts worth 50K, 2M10M, 100M, 300M, light up the corresponding achievements separately;</string>
<string name="gift_wall_entrance8_8">Rain and dew evenly: the cumulative Style quantity of gifts given to anchors reaches 10, 20, 50, 100200, can achieve success;</string>
<string name="gift_wall_entrance8_9">gift machine: The cumulative number of gifts given reaches 200, 1000, 10K100K1M,light up the corresponding achievements separately;</string>
<string name="gift_wall_entrance8_10">lighting master: The number of unlocked Gift Walls has reached 10, 30, 50 At 100 and 200, light up the corresponding achievements separately.</string>
<string name="gift_wall_entrance8_7">Rich and willful: the cumulative number of gift value diamonds sent reaches 10M to light up this achievement;</string>
<string name="gift_wall_entrance8_8">Equal love: The cumulative number of people who have given gifts to the anchor reaches 50 to light up this achievement;</string>
<string name="gift_wall_entrance8_9">Gift machine: when the accumulated number of gifts reaches 1000, this achievement will be activated;</string>
<string name="gift_wall_entrance8_10">Lighting Master: Unlock [Gift Wall] reaches 100 to light up this achievement.</string>
<string name="regular_bubble">rule</string>
<string name="unlit_icon_hint2">The current event has not sent any gifts</string>
<string name="rule_introduction">Rule introduction</string>

View File

@ -1278,10 +1278,10 @@
<string name="gift_wall_entrance8_4">富甲一方收到的單款禮物價格超過50000鑽時即可點亮該成就</string>
<string name="gift_wall_entrance8_5">腰纏萬貫當收到100款價格超過3000鑽的禮物時即可點亮該成就。</string>
<string name="gift_wall_entrance8_6">當前用戶共有4個成就分別是有錢任性、雨露均沾、送禮機器、點燈大師。</string>
<string name="gift_wall_entrance8_7">有錢任性:纍計送出禮物價值鉆石數量達到50K、2M、10M、100M、300M時分別點亮對應的成就</string>
<string name="gift_wall_entrance8_8">雨露均沾:纍計送禮給主播人數達到10、20、50、100、200時分別點亮對應的成就;</string>
<string name="gift_wall_entrance8_9">送禮機器:纍計贈送禮物個數達到200、1000、10K、00K、1M時分別點亮對應的成就;</string>
<string name="gift_wall_entrance8_10">點燈大師解鎖【禮物墻】的數量達到10、30、50、100、200時,分別點亮對應的成就</string>
<string name="gift_wall_entrance8_7">有錢任性:纍計送出禮物價值鉆石數量達到10M點亮该成就</string>
<string name="gift_wall_entrance8_8">雨露均沾:纍計送禮給主播人數達到50點亮该成就;</string>
<string name="gift_wall_entrance8_9">送禮機器:纍計贈送禮物個數達到1000點亮该成就;</string>
<string name="gift_wall_entrance8_10">點燈大師解鎖【禮物墻】的數量達到100點亮该成就</string>
<string name="regular_bubble">規則</string>
<string name="unlit_icon_hint2">当前活动暂未送出任何礼物哦</string>
<string name="rule_introduction">規則介紹</string>

View File

@ -1277,10 +1277,10 @@
<string name="gift_wall_entrance8_4">富甲一方收到的單款禮物價格超過50000鑽時即可點亮該成就</string>
<string name="gift_wall_entrance8_5">腰纏萬貫當收到100款價格超過3000鑽的禮物時即可點亮該成就。</string>
<string name="gift_wall_entrance8_6">當前用戶共有4個成就分別是有錢任性、雨露均沾、送禮機器、點燈大師。</string>
<string name="gift_wall_entrance8_7">有錢任性:纍計送出禮物價值鉆石數量達到50K、2M、10M、100M、300M時分別點亮對應的成就</string>
<string name="gift_wall_entrance8_8">雨露均沾:纍計送禮給主播人數達到10、20、50、100、200時分別點亮對應的成就;</string>
<string name="gift_wall_entrance8_9">送禮機器:纍計贈送禮物個數達到200、1000、10K、00K、1M時分別點亮對應的成就;</string>
<string name="gift_wall_entrance8_10">點燈大師解鎖【禮物墻】的數量達到10、30、50、100、200時,分別點亮對應的成就</string>
<string name="gift_wall_entrance8_7">有錢任性:纍計送出禮物價值鉆石數量達到10M點亮该成就</string>
<string name="gift_wall_entrance8_8">雨露均沾:纍計送禮給主播人數達到50點亮该成就;</string>
<string name="gift_wall_entrance8_9">送禮機器:纍計贈送禮物個數達到1000點亮该成就;</string>
<string name="gift_wall_entrance8_10">點燈大師解鎖【禮物墻】的數量達到100點亮该成就</string>
<string name="regular_bubble">規則</string>
<string name="unlit_icon_hint2">当前活动暂未送出任何礼物哦</string>
<string name="rule_introduction">規則介紹</string>

View File

@ -1277,10 +1277,10 @@
<string name="gift_wall_entrance8_4">富甲一方收到的單款禮物價格超過50000鑽時即可點亮該成就</string>
<string name="gift_wall_entrance8_5">腰纏萬貫當收到100款價格超過3000鑽的禮物時即可點亮該成就。</string>
<string name="gift_wall_entrance8_6">當前用戶共有4個成就分別是有錢任性、雨露均沾、送禮機器、點燈大師。</string>
<string name="gift_wall_entrance8_7">有錢任性:纍計送出禮物價值鉆石數量達到50K、2M、10M、100M、300M時分別點亮對應的成就</string>
<string name="gift_wall_entrance8_8">雨露均沾:纍計送禮給主播人數達到10、20、50、100、200時分別點亮對應的成就;</string>
<string name="gift_wall_entrance8_9">送禮機器:纍計贈送禮物個數達到200、1000、10K、100K、1M時分別點亮對應的成就;</string>
<string name="gift_wall_entrance8_10">點燈大師解鎖【禮物墻】的數量達到10、30、50、100、200時,分別點亮對應的成就</string>
<string name="gift_wall_entrance8_7">有錢任性:纍計送出禮物價值鉆石數量達到10M點亮该成就</string>
<string name="gift_wall_entrance8_8">雨露均沾:纍計送禮給主播人數達到50點亮该成就;</string>
<string name="gift_wall_entrance8_9">送禮機器:纍計贈送禮物個數達到1000點亮该成就;</string>
<string name="gift_wall_entrance8_10">點燈大師解鎖【禮物墻】的數量達到100點亮该成就</string>
<string name="regular_bubble">規則</string>
<string name="unlit_icon_hint2">當前活動暫未送出任何禮物哦</string>
<string name="rule_introduction">規則介紹</string>

View File

@ -956,7 +956,7 @@ Limited ride And limited avatar frame</string>
<string name="chat_chat">Chat</string>
<string name="lucky_angel">Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you!</string>
<string name="lucky_100">Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck!</string>
<string name="user_card_guard">Guardian group %s people</string>
<string name="user_card_guard">Guardian %s </string>
<string name="to_receive">receive</string>
<string name="to_complete">To complete</string>
<string name="already_collected">Already collected</string>
@ -1258,7 +1258,7 @@ Limited ride And limited avatar frame</string>
<string name="leveling_points">%s experience upgrade,%s receive rewards</string>
<string name="nothing_in_the_package_yet">There\'s nothing in the package yet</string>
<string name="reach_the_top">You have reached the highest level!</string>
<string name="custom_quantity">Custom quantity</string>
<string name="custom_quantity">Enter count</string>
<string name="gift_wall">Gift wall</string>
<string name="has_been_lit">Has been lit %s</string>
<string name="unlit_icon">Not lit up</string>
@ -1281,10 +1281,10 @@ Limited ride And limited avatar frame</string>
<string name="gift_wall_entrance8_4">A rich party: When the price of a single gift received exceeds 50000 diamonds, it is sufficient Illuminate the achievement;</string>
<string name="gift_wall_entrance8_5">Very rich: When receiving 100 gifts priced over 3000 diamonds, i.e This achievement can be illuminated.</string>
<string name="gift_wall_entrance8_6">The current user has a total of 4 achievements, namely being rich and capricious, sharing rain and dew, and giving gifts Gift machines, lighting masters.</string>
<string name="gift_wall_entrance8_7">Rich and capricious: Accumulated gifts worth 50K, 2M10M, 100M, 300M, light up the corresponding achievements separately;</string>
<string name="gift_wall_entrance8_8">Rain and dew evenly: the cumulative Style quantity of gifts given to anchors reaches 10, 20, 50, 100200, can achieve success;</string>
<string name="gift_wall_entrance8_9">gift machine: The cumulative number of gifts given reaches 200, 1000, 10K100K1M,light up the corresponding achievements separately;</string>
<string name="gift_wall_entrance8_10">lighting master: The number of unlocked Gift Walls has reached 10, 30, 50 At 100 and 200, light up the corresponding achievements separately.</string>
<string name="gift_wall_entrance8_7">Rich and willful: the cumulative number of gift value diamonds sent reaches 10M to light up this achievement;</string>
<string name="gift_wall_entrance8_8">Equal love: The cumulative number of people who have given gifts to the anchor reaches 50 to light up this achievement;</string>
<string name="gift_wall_entrance8_9">Gift machine: when the accumulated number of gifts reaches 1000, this achievement will be activated;</string>
<string name="gift_wall_entrance8_10">Lighting Master: Unlock [Gift Wall] reaches 100 to light up this achievement.</string>
<string name="regular_bubble">rule</string>
<string name="codex">Illustrated book</string>
<string name="honorary_achievement">Honor achievement</string>

View File

@ -89,7 +89,7 @@ public class GiftWallActivity extends AbsActivity {
ViewClicksAntiShake.clicksAntiShake(layoutLitIcon, () -> {
selectTab(textLitIcon, viewLitIcon);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive));
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive,false));
transaction.commit();
});
ViewClicksAntiShake.clicksAntiShake(layoutUnlitIcon, new ViewClicksAntiShake.ViewClicksCallBack() {
@ -118,7 +118,7 @@ public class GiftWallActivity extends AbsActivity {
public void onViewClicks() {
new XPopup.Builder(GiftWallActivity.this)
.enableDrag(false)
.asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, isLive))
.asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, mLiveUid,isLive))
.show();
}
});
@ -157,7 +157,7 @@ public class GiftWallActivity extends AbsActivity {
isAttention = intent.getIntExtra("isAttention", 0);
isLive = intent.getBooleanExtra("isLive", false);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive));
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive, false));
transaction.commit();
ImgLoader.display(GiftWallActivity.this, mAvatarUrl, avatar);
anchorName.setText(mAnchorName);
@ -192,7 +192,7 @@ public class GiftWallActivity extends AbsActivity {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGiftWallItemEvent(GiftWallItemEvent event) {
new XPopup.Builder(this)
.asCustom(new GiftWallItemPopup(this, event.getGiftWallModel(), event.isUnlit(), mLiveUid, mStream))
.asCustom(new GiftWallItemPopup(this, event.getGiftWallModel(), event.isUnlit(), mLiveUid, mLiveUid, mStream, false))
.show();
}

View File

@ -1564,7 +1564,7 @@ public class LiveAudienceActivity extends LiveActivity {
JSONObject item = (JSONObject) o;
List<LiveGiftBean> giftlist = JSONArray.parseArray(item.getJSONArray("giftlist").toJSONString(), LiveGiftBean.class);
for (LiveGiftBean bean : giftlist) {
if (!bean.getSwf().isEmpty()) {
if (bean!=null&&!bean.getSwf().isEmpty()) {
giftBeanList.add(bean);
}
}

View File

@ -17,7 +17,7 @@ import java.util.List;
public class CodexAdapter extends RecyclerView.Adapter {
private List<GiftGuideModel> giftGuideModels = new ArrayList<>();
private boolean history;
private String mStream, mLiveUid;
private String mStream, mLiveUid,toUid;
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
@ -28,7 +28,7 @@ public class CodexAdapter extends RecyclerView.Adapter {
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
CodexViewHolder codexViewHolder = (CodexViewHolder) holder;
codexViewHolder.showData(giftGuideModels.get(position), history,mStream,mLiveUid);
codexViewHolder.showData(giftGuideModels.get(position), history,mStream,mLiveUid,toUid);
}
@Override
@ -36,10 +36,11 @@ public class CodexAdapter extends RecyclerView.Adapter {
return giftGuideModels.size();
}
public void addAllData(List<GiftGuideModel> mGiftWall, boolean history, String mStream, String mLiveUid) {
public void addAllData(List<GiftGuideModel> mGiftWall, boolean history, String mStream, String mLiveUid, String toUid) {
this.history = history;
this.mStream = mStream;
this.mLiveUid = mLiveUid;
this.toUid = toUid;
giftGuideModels.clear();
giftGuideModels.addAll(mGiftWall);
notifyDataSetChanged();

View File

@ -39,7 +39,7 @@ public class CoinModel extends BaseModel {
coin = coin + "k";
}
if (999999999999L < coinMoney && coinMoney <= 999999999999999L) {
coin = coin.substring(0, coin.length() - 3);
coin = coin.substring(0, coin.length() - 6);
coin = coin + "M";
}
return coin;
@ -57,7 +57,7 @@ public class CoinModel extends BaseModel {
gold = gold + "k";
}
if (999999999999L < goldMoney && goldMoney <= 999999999999999L) {
gold = gold.substring(0, gold.length() - 3);
gold = gold.substring(0, gold.length() - 6);
gold = gold + "M";
}
return gold;

View File

@ -24,16 +24,17 @@ import org.greenrobot.eventbus.ThreadMode;
import java.util.List;
public class CodexDialog extends BottomPopupView {
private String mStream, mLiveUid;
private String mStream, mLiveUid, toUid;
private RecyclerView liveCodex;
private CodexAdapter codexAdapter;
private boolean history;
public CodexDialog(@NonNull Context context, String mStream, String mLiveUid, boolean history) {
public CodexDialog(@NonNull Context context, String mStream, String mLiveUid, String toUid, boolean history) {
super(context);
this.mLiveUid = mLiveUid;
this.mStream = mStream;
this.history = history;
this.toUid = toUid;
}
// 返回自定义弹窗的布局
@ -54,10 +55,10 @@ public class CodexDialog extends BottomPopupView {
private void initDate() {
if (history) {
LiveNetManager.get(getContext()).
getGiftGuideHistory(mLiveUid, new HttpCallback<List<GiftGuideModel>>() {
getGiftGuideHistory(toUid,mLiveUid, new HttpCallback<List<GiftGuideModel>>() {
@Override
public void onSuccess(List<GiftGuideModel> data) {
codexAdapter.addAllData(data,history,mStream,mLiveUid);
codexAdapter.addAllData(data,history,mStream,mLiveUid,toUid);
}
@Override
@ -67,10 +68,10 @@ public class CodexDialog extends BottomPopupView {
});
} else {
LiveNetManager.get(getContext()).
getGiftGuide(mLiveUid, new HttpCallback<List<GiftGuideModel>>() {
getGiftGuide(mLiveUid, toUid,new HttpCallback<List<GiftGuideModel>>() {
@Override
public void onSuccess(List<GiftGuideModel> data) {
codexAdapter.addAllData(data,history,mStream,mLiveUid);
codexAdapter.addAllData(data,history,mStream,mLiveUid,toUid);
}
@Override

View File

@ -21,15 +21,10 @@ import com.yunbao.common.event.LiveGiftDialogEvent;
import com.yunbao.common.fragment.AllServiceChampionFragment;
import com.yunbao.common.fragment.GiftWithoutWallFragment;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.event.LiveAudienceEvent;
import com.yunbao.live.views.GiftAlreadyWallFragment;
import org.greenrobot.eventbus.Subscribe;
@ -50,7 +45,7 @@ public class GiftWallDialog extends AbsDialogFragment {
private List<View> tabView = new ArrayList<>();
private String mStream, mAnchorName, mLiveUid, mAvatarUrl, toUid;
private int isAttention = 0;//是否关注 0=没关注,
private boolean isLive;//是否正在直播
private boolean isLive, sbWy;//是否正在直播
@Override
public void onActivityCreated(Bundle savedInstanceState) {
@ -83,7 +78,7 @@ public class GiftWallDialog extends AbsDialogFragment {
ViewClicksAntiShake.clicksAntiShake(layoutLitIcon, () -> {
selectTab(textLitIcon, viewLitIcon);
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid,isLive));
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid, isLive,sbWy));
transaction.commit();
});
ViewClicksAntiShake.clicksAntiShake(layoutUnlitIcon, new ViewClicksAntiShake.ViewClicksCallBack() {
@ -120,7 +115,7 @@ public class GiftWallDialog extends AbsDialogFragment {
public void onViewClicks() {
new XPopup.Builder(getContext())
.enableDrag(false)
.asCustom(new CodexDialog(getContext(), mStream, mLiveUid, false))
.asCustom(new CodexDialog(getContext(), mStream, mLiveUid, toUid,false))
.show();
}
});
@ -129,7 +124,7 @@ public class GiftWallDialog extends AbsDialogFragment {
public void onViewClicks() {
new XPopup.Builder(getContext())
.enableDrag(false)
.asCustom(new MedalAchievementPopup(getContext(), isLive, toUid,mLiveUid))
.asCustom(new MedalAchievementPopup(getContext(), isLive, toUid, mLiveUid))
.show();
}
});
@ -146,10 +141,12 @@ public class GiftWallDialog extends AbsDialogFragment {
}
});
}
private void forwardHomePage() {
dismiss();
RouteUtil.forwardUserHome(mContext, mLiveUid, false, mLiveUid, 0);
}
private void initDate() {
Bundle bundle = getArguments();
if (bundle == null) {
@ -162,14 +159,15 @@ public class GiftWallDialog extends AbsDialogFragment {
toUid = bundle.getString("toUid");
isAttention = bundle.getInt("isAttention");
isLive = bundle.getBoolean("isLive");
sbWy = bundle.getBoolean("SBW");
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid,isLive));
transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid, isLive,sbWy));
transaction.commit();
ImgLoader.display(getContext(), mAvatarUrl, avatar);
anchorName.setText(mAnchorName);
if (isLive){
if (isLive) {
textLitIcon.setText(getContext().getString(R.string.lit_icon));
}else {
} else {
textLitIcon.setText(getContext().getString(R.string.been_sent));
}
}
@ -227,7 +225,13 @@ public class GiftWallDialog extends AbsDialogFragment {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGiftWallItemEvent(GiftWallItemEvent event) {
new XPopup.Builder(getActivity())
.asCustom(new GiftWallItemPopup(getActivity(), event.getGiftWallModel(), event.isUnlit(), mLiveUid, mStream))
.asCustom(new GiftWallItemPopup(getActivity(),
event.getGiftWallModel(),
event.isUnlit(),
mLiveUid,
toUid,
mStream,
sbWy))
.show();
}

View File

@ -3,6 +3,7 @@ package com.yunbao.live.dialog;
import android.content.Context;
import android.graphics.Color;
import android.text.TextUtils;
import android.widget.ImageView;
import android.widget.TextView;
@ -14,6 +15,7 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallGiftDetail;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.event.LiveGiftDialogEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
@ -21,7 +23,6 @@ import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.event.LiveAudienceEvent;
import com.yunbao.common.event.LiveGiftDialogEvent;
public class GiftWallItemPopup extends CenterPopupView {
private CardView layout;
@ -29,16 +30,18 @@ public class GiftWallItemPopup extends CenterPopupView {
private TextView price, giftDetailsBtn, distanceNaming, vacantPositionAwaits, giftDetails, vacantPosition;
private GiftWallModel giftWallModel;
private boolean unlit;
private String mLiveUid, mStream;
private boolean isAnchor = false;
private String mLiveUid, mStream, toUid;
private boolean isAnchor = false, sbWy;
public GiftWallItemPopup(@NonNull Context context, GiftWallModel giftWallModel,
boolean unlit, String mLiveUid, String mStream) {
boolean unlit, String mLiveUid, String toUid, String mStream, boolean sbWy) {
super(context);
this.giftWallModel = giftWallModel;
this.unlit = unlit;
this.mLiveUid = mLiveUid;
this.toUid = toUid;
this.mStream = mStream;
this.sbWy = sbWy;
if (this.mLiveUid.equals(CommonAppConfig.getInstance().getUid())) {
isAnchor = true;
}
@ -66,7 +69,12 @@ public class GiftWallItemPopup extends CenterPopupView {
} else {
giftDetailsBtn.setText(getContext().getText(R.string.instant_light));
}
if(isAnchor){
if (sbWy && TextUtils.equals(mLiveUid, toUid)) {
giftDetailsBtn.setBackgroundResource(R.drawable.background_skip_button);
giftDetailsBtn.setEnabled(true);
giftDetailsBtn.setTextColor(Color.parseColor("#F16D00"));
}else {
giftDetailsBtn.setBackgroundResource(R.drawable.background_skip_unselect_button);
giftDetailsBtn.setEnabled(false);
giftDetailsBtn.setTextColor(Color.parseColor("#F2F2F2"));

View File

@ -366,6 +366,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
@Override
public void onFinish() {
getCoin();
// if (mLoading != null) {
// mLoading.setVisibility(View.INVISIBLE);
// }
@ -689,11 +690,13 @@ public class LiveGiftPopup extends AbsDialogFragment {
}
if (liveGiftModel.getType() == 7) {
iconArrow.setVisibility(View.GONE);
showBlindProgress(liveGiftModel.getBlind_box_type());
} else {
blindBox.setVisibility(View.INVISIBLE);
mCount = DEFAULT_COUNT;
giftNumber.setText(mCount);
iconArrow.setVisibility(View.VISIBLE);
}
liveGiftSend.setEnabled(true);
giftNumberLayout.setVisibility(View.VISIBLE);

View File

@ -37,7 +37,7 @@ public class CodexViewHolder extends RecyclerView.ViewHolder {
giftList.setAdapter(codexItemAdapter);
}
public void showData(GiftGuideModel giftGuideModel, boolean history, String mStream, String mLiveUid) {
public void showData(GiftGuideModel giftGuideModel, boolean history, String mStream, String mLiveUid, String toUid) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(giftGuideModel.getIlluminateCount())
.append("/")
@ -60,7 +60,7 @@ public class CodexViewHolder extends RecyclerView.ViewHolder {
public void onViewClicks() {
new XPopup.Builder(itemView.getContext())
.enableDrag(false)
.asCustom(new CodexDialog(itemView.getContext(), mStream, mLiveUid,true))
.asCustom(new CodexDialog(itemView.getContext(), mStream, mLiveUid,toUid,true))
.show();
}
});

View File

@ -1,8 +1,6 @@
package com.yunbao.live.views;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -20,7 +18,6 @@ import com.yunbao.common.event.LiveGiftDialogEvent;
import com.yunbao.common.fragment.BaseFragment;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.event.LiveAudienceEvent;
@ -34,7 +31,7 @@ public class GiftAlreadyWallFragment extends BaseFragment {
private RecyclerView alreadyList;
private GiftAlreadyWallAdapter alreadyWallAdapter;
private TextView litIcon, giftAll, unlitIconHint, instantLight;
private boolean isAnchor;
private boolean isAnchor, sbWy;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
@ -48,6 +45,7 @@ public class GiftAlreadyWallFragment extends BaseFragment {
mLiveUid = bundle.getString("mLiveUid");
toUid = bundle.getString("toUid");
isAnchor = bundle.getBoolean("isAnchor");
isAnchor = bundle.getBoolean("SBW");
}
@Override
@ -59,22 +57,20 @@ public class GiftAlreadyWallFragment extends BaseFragment {
giftAll = contentView.findViewById(R.id.gift_all);
instantLight = contentView.findViewById(R.id.instant_light);
unlitIconHint = contentView.findViewById(R.id.unlit_icon_hint);
alreadyWallAdapter = new GiftAlreadyWallAdapter();
alreadyWallAdapter = new GiftAlreadyWallAdapter(sbWy);
alreadyList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
alreadyList.setAdapter(alreadyWallAdapter);
if(mLiveUid.equals(CommonAppConfig.getInstance().getUid())){
instantLight.setBackgroundResource(R.drawable.background_skip_unselect_button);
instantLight.setEnabled(false);
instantLight.setTextColor(Color.parseColor("#F2F2F2"));
if (mLiveUid.equals(CommonAppConfig.getInstance().getUid())) {
instantLight.setVisibility(View.VISIBLE);
} else {
instantLight.setVisibility(View.GONE);
}
if (isAnchor) {
unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint));
} else {
unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint2));
}
if (TextUtils.equals(IMLoginManager.get(getContext()).getUserInfo().getId() + "", toUid)) {
instantLight.setVisibility(View.VISIBLE);
}
ViewClicksAntiShake.clicksAntiShake(contentView.findViewById(R.id.instant_light), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
@ -89,7 +85,7 @@ public class GiftAlreadyWallFragment extends BaseFragment {
@Override
protected void loadData() {
if (isAnchor){
if (isAnchor) {
LiveNetManager.get(getActivity()).
giftAlreadyWall(mLiveUid, toUid, new HttpCallback<GiftAlreadyWallModel>() {
@Override
@ -111,7 +107,7 @@ public class GiftAlreadyWallFragment extends BaseFragment {
}
});
}else {
} else {
LiveNetManager.get(getActivity()).
giftUserSendWall(mLiveUid, toUid, new HttpCallback<GiftAlreadyWallModel>() {
@Override
@ -137,7 +133,11 @@ public class GiftAlreadyWallFragment extends BaseFragment {
}
public static GiftAlreadyWallFragment newInstance(String mStream, String mLiveUid, String toUid, boolean isAnchor) {
public static GiftAlreadyWallFragment newInstance(String mStream,
String mLiveUid,
String toUid,
boolean isAnchor,
boolean sbWy) {
GiftAlreadyWallFragment liveGiftFragment = new GiftAlreadyWallFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
@ -145,6 +145,7 @@ public class GiftAlreadyWallFragment extends BaseFragment {
bundle.putString("mLiveUid", mLiveUid);
bundle.putString("toUid", toUid);
bundle.putBoolean("isAnchor", isAnchor);
bundle.putBoolean("SBW", sbWy);
liveGiftFragment.setArguments(bundle);
return liveGiftFragment;
}

View File

@ -453,7 +453,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
}
}else if("checkNewLetter".equals(str)){
} else if ("checkNewLetter".equals(str)) {
checkNewLetter();
}
}
@ -2682,6 +2682,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
bundle.putString("toUid", toUid);
bundle.putInt("isAttention", isAttention);
bundle.putBoolean("isLive", isAnchor);
bundle.putBoolean("SBW", !(mContext instanceof LiveRyAnchorActivity));
giftWallDialog.setArguments(bundle);
giftWallDialog.show(((AbsActivity) mContext).getSupportFragmentManager(), "GiftWallDialog");