|
@@ -103,6 +103,7 @@ import com.jixin.im.db.dao.RoomMemberDao;
|
|
|
import com.jixin.im.db.dao.VideoFileDao;
|
|
|
import com.jixin.im.downloader.Downloader;
|
|
|
import com.jixin.im.helper.DialogHelper;
|
|
|
+import com.jixin.im.helper.ImageLoadHelper;
|
|
|
import com.jixin.im.helper.LoginSecureHelper;
|
|
|
import com.jixin.im.helper.PrivacySettingHelper;
|
|
|
import com.jixin.im.helper.ScheduleHelper;
|
|
@@ -204,6 +205,7 @@ import de.greenrobot.event.ThreadMode;
|
|
|
import fm.jiecao.jcvideoplayer_lib.JCVideoPlayer;
|
|
|
import okhttp3.Call;
|
|
|
import okhttp3.ResponseBody;
|
|
|
+import pl.droidsonroids.gif.GifDrawable;
|
|
|
import retrofit2.Callback;
|
|
|
import retrofit2.Response;
|
|
|
import top.zibin.luban.Luban;
|
|
@@ -450,7 +452,12 @@ public class MucChatFragment extends EasyFragment implements
|
|
|
}
|
|
|
getMyInfoInThisRoom();
|
|
|
} else if (action.equals(OtherBroadcast.QC_FINISH)) {
|
|
|
- finish();
|
|
|
+ int mOperationCode = intent.getIntExtra("Operation_Code", 0);
|
|
|
+ if (mOperationCode == 1) {// 更换聊天背景成功 更新当前页面
|
|
|
+ loadBackdrop();
|
|
|
+ } else {// 快速创建群组成功 关闭当前页面
|
|
|
+ finish();
|
|
|
+ }
|
|
|
} else if (action.equals(OtherBroadcast.REFRESH_WELFARE_INFO)) {
|
|
|
//表头推送
|
|
|
if (lottery == 1) {
|
|
@@ -465,6 +472,46 @@ public class MucChatFragment extends EasyFragment implements
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ public void loadBackdrop() {
|
|
|
+ String mChatBgPath = PreferenceUtils.getString(getActivity(), Constants.SET_CHAT_BACKGROUND_PATH
|
|
|
+ + mFriend.getRoomId() + mLoginUserId, "reset");
|
|
|
+
|
|
|
+ String mChatBg = PreferenceUtils.getString(getActivity(), Constants.SET_CHAT_BACKGROUND
|
|
|
+ + mFriend.getRoomId() + mLoginUserId, "reset");
|
|
|
+
|
|
|
+ if (TextUtils.isEmpty(mChatBgPath)
|
|
|
+ || mChatBg.equals("reset")) {// 未设置聊天背景或者还原了聊天背景
|
|
|
+ mChatBgIv.setImageDrawable(null);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ File file = new File(mChatBgPath);
|
|
|
+ if (file.exists()) {// 加载本地
|
|
|
+ if (mChatBgPath.toLowerCase().endsWith("gif")) {
|
|
|
+ try {
|
|
|
+ GifDrawable gifDrawable = new GifDrawable(file);
|
|
|
+ mChatBgIv.setImageDrawable(gifDrawable);
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ImageLoadHelper.showFileWithError(
|
|
|
+ getActivity(),
|
|
|
+ file,
|
|
|
+ R.drawable.fez,
|
|
|
+ mChatBgIv
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else {// 加载网络
|
|
|
+ ImageLoadHelper.showImageWithError(
|
|
|
+ getActivity(),
|
|
|
+ mChatBg,
|
|
|
+ R.color.chat_bg,
|
|
|
+ mChatBgIv
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
private CountDownTimer mBaoXiangDownTimer;
|
|
|
public MediaPlayer mediaPlayer;
|
|
|
private LinearLayout llWelfareNotice;
|