|
@@ -4,6 +4,7 @@ import android.os.Bundle;
|
|
|
import android.support.design.widget.TabLayout;
|
|
import android.support.design.widget.TabLayout;
|
|
|
import android.support.v4.app.Fragment;
|
|
import android.support.v4.app.Fragment;
|
|
|
import android.support.v4.view.ViewPager;
|
|
import android.support.v4.view.ViewPager;
|
|
|
|
|
+import android.util.Log;
|
|
|
import android.view.KeyEvent;
|
|
import android.view.KeyEvent;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
import android.widget.Button;
|
|
import android.widget.Button;
|
|
@@ -119,31 +120,6 @@ public class FgtGameCenter extends BaseFragment {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-// if(ViewUtil.isVisible(fgt_gc_hb_500_yuan_drl)) {
|
|
|
|
|
-// ViewUtil.setVisibility(fgt_gc_hb_500_yuan_drl, false);
|
|
|
|
|
-// CommonUtil.getInstance().callActionWithUserInfo(userEntity -> {
|
|
|
|
|
-// String code = userEntity.getParent_code();
|
|
|
|
|
-// if (TextUtils.isEmpty(code)) {
|
|
|
|
|
-// code = userEntity.getInvitation_code();
|
|
|
|
|
-// }
|
|
|
|
|
-// SheepApp.getInstance().getNetComponent().getApiService().getUserIsShouYou(code)
|
|
|
|
|
-// .subscribeOn(Schedulers.io())
|
|
|
|
|
-// .observeOn(AndroidSchedulers.mainThread())
|
|
|
|
|
-// .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
|
|
|
|
|
-// @Override
|
|
|
|
|
-// public void onNext(BaseMessage baseMessage) {
|
|
|
|
|
-// boolean result = baseMessage.getData(Boolean.class);
|
|
|
|
|
-// ViewUtil.setVisibility(fgt_gc_hb_500_yuan_drl, !result);//不是会长或不是会长邀请的用户,才显示赏金任务入口
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// @Override
|
|
|
|
|
-// public void onError(BaseMessage baseMessage) {
|
|
|
|
|
-// ViewUtil.setVisibility(fgt_gc_hb_500_yuan_drl, false);
|
|
|
|
|
-// }
|
|
|
|
|
-// });
|
|
|
|
|
-// });
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void initData() {
|
|
private void initData() {
|
|
@@ -151,7 +127,9 @@ public class FgtGameCenter extends BaseFragment {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void initDataOnVisibleToUser() {
|
|
public void initDataOnVisibleToUser() {
|
|
|
-
|
|
|
|
|
|
|
+ if (gameMallFgt != null && pager.getCurrentItem() == 3) {
|
|
|
|
|
+ ((BaseFragment) gameMallFgt).initDataOnVisibleToUser();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -177,10 +155,10 @@ public class FgtGameCenter extends BaseFragment {
|
|
|
@Subscribe
|
|
@Subscribe
|
|
|
public void WhenWebViewEventComing(WebViewEvent ev) {
|
|
public void WhenWebViewEventComing(WebViewEvent ev) {
|
|
|
if (gameMallFgt != null && ev.action == WebViewEvent.ACTION_REFRESH_GAME_MALL) {
|
|
if (gameMallFgt != null && ev.action == WebViewEvent.ACTION_REFRESH_GAME_MALL) {
|
|
|
- if(gameMallFgt instanceof FgtWeb) {
|
|
|
|
|
- ((FgtWeb)gameMallFgt).callTransparent(ev.callback, ev.data);
|
|
|
|
|
- }else{
|
|
|
|
|
- ((FgtWebX5)gameMallFgt).callTransparent(ev.callback, ev.data);
|
|
|
|
|
|
|
+ if (gameMallFgt instanceof FgtWeb) {
|
|
|
|
|
+ ((FgtWeb) gameMallFgt).callTransparent(ev.callback, ev.data);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ((FgtWebX5) gameMallFgt).callTransparent(ev.callback, ev.data);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|