修复:礼物,坐骑显示问题
This commit is contained in:
parent
7bbe82d72c
commit
b377d01ca3
@ -61,6 +61,7 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
|
||||
ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialSwitch);
|
||||
}
|
||||
//更新特效开关
|
||||
IMLoginManager.get(getContext()).setGiftEffect(giftEffect);
|
||||
IMLoginManager.get(getContext()).upDataUserInfo(userInfo.setGiftEffect(giftEffect));
|
||||
}
|
||||
);
|
||||
@ -73,6 +74,7 @@ public class EffectsSettingsDialog extends AbsDialogFragment {
|
||||
ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialMountSwitch);
|
||||
}
|
||||
//更新特效开关
|
||||
IMLoginManager.get(getContext()).setMountEffect(mountEffect);
|
||||
IMLoginManager.get(getContext()).upDataUserInfo(userInfo.setMountEffect(mountEffect));
|
||||
}
|
||||
);
|
||||
|
@ -27,6 +27,8 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
private IMLoginModel userInfo;
|
||||
private final static String isNewUserGif = "isNewUserGif";
|
||||
private final static String isNewUserOne = "isNewUserOne";
|
||||
private final static String GiftEffect = "giftEffect";
|
||||
private final static String MountEffect = "mountEffect";
|
||||
//暂时缓存token
|
||||
private String token = "";
|
||||
|
||||
@ -85,6 +87,8 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
if (userInfo != null)
|
||||
token = userInfo.getToken();
|
||||
}
|
||||
userInfo.setGiftEffect(getBoolean(GiftEffect, false));
|
||||
userInfo.setMountEffect(getBoolean(MountEffect, false));
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
@ -108,6 +112,8 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
if (userInfo != null && !TextUtils.isEmpty(userInfo.getToken())) {
|
||||
token = userInfo.getToken();
|
||||
}
|
||||
userInfo.setGiftEffect(getBoolean(GiftEffect, false));
|
||||
userInfo.setMountEffect(getBoolean(MountEffect, false));
|
||||
if (netHandler == null) {
|
||||
netHandler = new Handler();
|
||||
}
|
||||
@ -124,6 +130,8 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
if (!TextUtils.isEmpty(token)) {
|
||||
userInfo.setToken(token);
|
||||
}
|
||||
userInfo.setGiftEffect(getBoolean(GiftEffect, false));
|
||||
userInfo.setMountEffect(getBoolean(MountEffect, false));
|
||||
put(KEY_USER_INFO, new Gson().toJson(userInfo));
|
||||
//兼容老模块(之后要把用户维护的类更换掉)
|
||||
SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, new Gson().toJson(userInfo));
|
||||
@ -139,11 +147,23 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
if (!TextUtils.isEmpty(token)) {
|
||||
userInfo.setToken(token);
|
||||
}
|
||||
userInfo.setGiftEffect(getBoolean(GiftEffect, false));
|
||||
userInfo.setMountEffect(getBoolean(MountEffect, false));
|
||||
deleteByKey(KEY_USER_INFO);
|
||||
put(KEY_USER_INFO, new Gson().toJson(userInfo));
|
||||
//兼容老模块(之后要把用户维护的类更换掉)
|
||||
SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, new Gson().toJson(userInfo));
|
||||
}
|
||||
|
||||
public void setGiftEffect(boolean giftEffect) {
|
||||
put(GiftEffect, giftEffect);
|
||||
}
|
||||
|
||||
public void setMountEffect(boolean mountEffect) {
|
||||
|
||||
put(MountEffect, mountEffect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新请求管理员身份信息
|
||||
*/
|
||||
|
@ -294,6 +294,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
LiveRoomCheckLivePresenter.isRoom = true;
|
||||
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> {
|
||||
//主播正在直播
|
||||
if (liveBean1 == null) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.Display;
|
||||
import android.view.Gravity;
|
||||
@ -136,12 +135,12 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
||||
|
||||
@Override
|
||||
protected void setWindowAttributes(Window window) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
window.setStatusBarColor(0);
|
||||
}
|
||||
|
||||
window.setWindowAnimations(com.yunbao.common.R.style.RightLeftToAnim);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = DeviceUtils.getScreenWidth(getActivity()) / 3 * 2;
|
||||
@ -151,7 +150,6 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 前往直播间
|
||||
*/
|
||||
|
@ -859,12 +859,6 @@ public class LiveGiftAnimPresenter {
|
||||
|
||||
AllMsgTextRender.render(mContext, mGifGiftTipAllServer, mTempGifGiftBean.getGiftIcon(), mTempGifGiftBean.getUserNiceName(), mAncherName, mTempGifGiftBean.getGiftName(), 1, mWindowManager, "");
|
||||
|
||||
//下载横幅前面的动画
|
||||
// ConfigBean configBean = CommonAppConfig.getInstance().getConfig();
|
||||
// String testUrl = configBean.getAllServerGiftIcon();
|
||||
// if (!testUrl.isEmpty() && testUrl != null)
|
||||
// GifCacheUtil.getFile(Constants.GIF_GIFT_PREFIX + GIFTFRONT_ID, testUrl, "1", mDownloadIconCallback);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1224,6 +1218,7 @@ public class LiveGiftAnimPresenter {
|
||||
*/
|
||||
private void playSVGA(SVGAVideoEntity svgaVideoEntity) {
|
||||
if (mSVGAImageView != null) {
|
||||
mSVGAImageView.setVisibility(View.VISIBLE);
|
||||
SVGARect rect = svgaVideoEntity.getVideoSize();
|
||||
resizeSvgaImageView(rect.getWidth(), rect.getHeight());
|
||||
mSvgaPlayTime = System.currentTimeMillis();
|
||||
@ -1239,6 +1234,7 @@ public class LiveGiftAnimPresenter {
|
||||
public void onFinished() {
|
||||
mSVGAImageView.clear();
|
||||
mSVGAImageView.setVisibility(View.GONE);
|
||||
mShowGif = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -32,7 +32,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
private ActionListener mActionListener;
|
||||
private int mLiveSdk;
|
||||
//搜索页面不提示密码
|
||||
public static boolean isSearch = false;
|
||||
public static boolean isRoom = false;
|
||||
|
||||
public LiveRoomCheckLivePresenter(Context context, ActionListener actionListener) {
|
||||
mContext = context;
|
||||
@ -102,7 +102,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
* 前往密码房间
|
||||
*/
|
||||
private void forwardPwdRoom() {
|
||||
if (!isSearch) {
|
||||
if (!isRoom) {
|
||||
DialogUitl.showSimpleInputDialog(mContext, WordUtil.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
@ -121,7 +121,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
});
|
||||
}else {
|
||||
enterLiveRoom();
|
||||
isSearch = false;
|
||||
isRoom = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -126,6 +126,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
|
||||
|
||||
private void svga_new_user_gif() {
|
||||
svga_new_user_gif.setVisibility(View.VISIBLE);
|
||||
new SVGAParser(mContext).decodeFromAssets("free_gift_tip.svga", new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
@ -142,6 +143,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
|
||||
private void svga_new_user_double() {
|
||||
svga_new_user_double.setVisibility(View.VISIBLE);
|
||||
new SVGAParser(mContext).decodeFromAssets("double_click_tip.svga", new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
@ -159,6 +161,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
|
||||
private void svga_new_user_follow() {
|
||||
svga_new_user_follow.setVisibility(View.VISIBLE);
|
||||
new SVGAParser(mContext).decodeFromAssets("live_follow_tip.svga", new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
|
@ -26,9 +26,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="8dp">
|
||||
android:paddingTop="56dp">
|
||||
|
||||
|
||||
<com.yunbao.common.custom.CommonRefreshView
|
||||
|
@ -10,17 +10,24 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="77dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:delay_time="3000"
|
||||
app:indicator_drawable_selected="@drawable/bg_home_indicator_selected"
|
||||
app:indicator_drawable_unselected="@drawable/bg_home_indicator_unselected"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_margin="6dp"
|
||||
app:indicator_width="8dp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -175,7 +175,7 @@ public class SearchActivity extends AbsActivity {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
|
||||
LiveRoomCheckLivePresenter.isSearch = true;
|
||||
|
||||
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> {
|
||||
if (liveBean1 == null) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user