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