111
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 63 KiB |
@ -23,7 +23,7 @@ import java.net.UnknownServiceException;
|
|||||||
|
|
||||||
public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
||||||
|
|
||||||
private Dialog mLoadingDialog;
|
// private Dialog mLoadingDialog;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JsonBean convertResponse(okhttp3.Response response) throws Throwable {
|
public JsonBean convertResponse(okhttp3.Response response) throws Throwable {
|
||||||
@ -62,9 +62,9 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
|||||||
if (t instanceof SocketTimeoutException || t instanceof ConnectException || t instanceof UnknownHostException || t instanceof UnknownServiceException || t instanceof SocketException) {
|
if (t instanceof SocketTimeoutException || t instanceof ConnectException || t instanceof UnknownHostException || t instanceof UnknownServiceException || t instanceof SocketException) {
|
||||||
ToastUtil.show(R.string.load_failure);
|
ToastUtil.show(R.string.load_failure);
|
||||||
}
|
}
|
||||||
if (showLoadingDialog() && mLoadingDialog != null) {
|
// if (showLoadingDialog() && mLoadingDialog != null) {
|
||||||
mLoadingDialog.dismiss();
|
// mLoadingDialog.dismiss();
|
||||||
}
|
// }
|
||||||
onError();
|
onError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,21 +81,21 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
if (showLoadingDialog()) {
|
// if (showLoadingDialog()) {
|
||||||
if (mLoadingDialog == null) {
|
// if (mLoadingDialog == null) {
|
||||||
mLoadingDialog = createLoadingDialog();
|
// mLoadingDialog = createLoadingDialog();
|
||||||
}
|
// }
|
||||||
try {
|
// try {
|
||||||
mLoadingDialog.show();
|
// mLoadingDialog.show();
|
||||||
}catch (Exception e){e.printStackTrace();}
|
// }catch (Exception e){e.printStackTrace();}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
if (showLoadingDialog() && mLoadingDialog != null) {
|
// if (showLoadingDialog() && mLoadingDialog != null) {
|
||||||
mLoadingDialog.dismiss();
|
// mLoadingDialog.dismiss();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dialog createLoadingDialog() {
|
public Dialog createLoadingDialog() {
|
||||||
|
@ -174,7 +174,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setData(LiveGiftBean bean, int position, Object payload) {
|
void setData(LiveGiftBean bean, int position, Object payload) {
|
||||||
if( IMLoginManager.get(mContext).isNewUserGif()== false) {
|
if( IMLoginManager.get(mContext).isNewUserGif()== true) {
|
||||||
if (position == 0 && bean.getTag()!=null) {
|
if (position == 0 && bean.getTag()!=null) {
|
||||||
mRadioButton.setBackgroundResource(R.mipmap.live_gift_light_bg);
|
mRadioButton.setBackgroundResource(R.mipmap.live_gift_light_bg);
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
|||||||
}
|
}
|
||||||
mPrice.setText(bean.getPrice());
|
mPrice.setText(bean.getPrice());
|
||||||
|
|
||||||
if (IMLoginManager.get(mContext).isNewUserGif() == false && position == 0 && bean.getTag() != null) {
|
if (IMLoginManager.get(mContext).isNewUserGif() == true && position == 0 && bean.getTag() != null) {
|
||||||
mPayico.setVisibility(View.GONE);
|
mPayico.setVisibility(View.GONE);
|
||||||
mPrice.setText(R.string.free);
|
mPrice.setText(R.string.free);
|
||||||
mPrice.setTextColor(Color.parseColor("#FFF269"));
|
mPrice.setTextColor(Color.parseColor("#FFF269"));
|
||||||
|
@ -427,12 +427,9 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showGiftList(List<LiveGiftBean> list) {
|
private void showGiftList(List<LiveGiftBean> list) {
|
||||||
if (IMLoginManager.get(mContext).isNewUserGif() == false && type_name.equals("熱門")|| type_name.equals("Hot")) {
|
if (IMLoginManager.get(mContext).isNewUserGif() == true && type_name.equals("熱門")|| type_name.equals("Hot")) {
|
||||||
ToastUtil.show(IMLoginManager.get(mContext).isNewUserGif() +"aaaa");
|
|
||||||
|
|
||||||
list.add(0, bean1);
|
|
||||||
if(mWishGiftId==null) {
|
if(mWishGiftId==null) {
|
||||||
ToastUtil.show(12121+"");
|
|
||||||
|
|
||||||
mWishGiftId = "" + bean1.getId();
|
mWishGiftId = "" + bean1.getId();
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,6 @@ public class LiveContributeViewHolder extends AbsLivePageViewHolder implements V
|
|||||||
if (!mLoad) {
|
if (!mLoad) {
|
||||||
mLoad = true;
|
mLoad = true;
|
||||||
mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid);
|
mWebView.loadUrl(HtmlConfig.LIVE_LIST + mLiveUid);
|
||||||
Log.e("ttt",HtmlConfig.LIVE_LIST + mLiveUid);
|
|
||||||
} else {
|
} else {
|
||||||
mWebView.reload();
|
mWebView.reload();
|
||||||
}
|
}
|
||||||
|
@ -321,6 +321,7 @@ public class LoginActivity extends AbsActivity {
|
|||||||
MainActivity.forward(LoginActivity.this, false);
|
MainActivity.forward(LoginActivity.this, false);
|
||||||
gotoLive(obj.getString("anchor_id"));
|
gotoLive(obj.getString("anchor_id"));
|
||||||
IMLoginManager.get(mContext).setisNewUserOne(true);
|
IMLoginManager.get(mContext).setisNewUserOne(true);
|
||||||
|
IMLoginManager.get(mContext).setNewUserGif(true);
|
||||||
if (obj.containsKey("home_zdy_pop")) {
|
if (obj.containsKey("home_zdy_pop")) {
|
||||||
NoviceInstructorManager.get(mContext).setHomeZdyPop(obj.getString("home_zdy_pop"));
|
NoviceInstructorManager.get(mContext).setHomeZdyPop(obj.getString("home_zdy_pop"));
|
||||||
}
|
}
|
||||||
|