1.钻石宝箱去掉限时

This commit is contained in:
huangjian
2020-05-13 11:09:56 +08:00
parent 9b07d94a2d
commit 8923c4b517
4 changed files with 3 additions and 47 deletions

View File

@@ -30,7 +30,6 @@ import io.reactivex.disposables.Disposable;
public class ChooseTreasureBoxDialogFragment extends DialogFragment implements View.OnClickListener { public class ChooseTreasureBoxDialogFragment extends DialogFragment implements View.OnClickListener {
private TextView honourLimitTip;
private ConstraintLayout clBoxNormal, clBoxHonour; private ConstraintLayout clBoxNormal, clBoxHonour;
private OnTreasureBoxChooseListener onTreasureBoxChooseListener; private OnTreasureBoxChooseListener onTreasureBoxChooseListener;
@@ -51,7 +50,6 @@ public class ChooseTreasureBoxDialogFragment extends DialogFragment implements V
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
clBoxNormal = view.findViewById(R.id.cl_box_normal); clBoxNormal = view.findViewById(R.id.cl_box_normal);
clBoxHonour = view.findViewById(R.id.cl_box_honour); clBoxHonour = view.findViewById(R.id.cl_box_honour);
honourLimitTip = view.findViewById(R.id.tv_honour_box_limit);
view.findViewById(R.id.iv_close).setOnClickListener(this); view.findViewById(R.id.iv_close).setOnClickListener(this);
clBoxNormal.setOnClickListener(this); clBoxNormal.setOnClickListener(this);
clBoxHonour.setOnClickListener(this); clBoxHonour.setOnClickListener(this);
@@ -72,33 +70,6 @@ public class ChooseTreasureBoxDialogFragment extends DialogFragment implements V
} }
} }
// 钻石宝箱的限时时长以及是否可以点击 由接口控制
BoxModel.get().getBoxOpenStatusInfo(BoxModel.BOX_TYPE_HONOUR)
.subscribe(new SingleObserver<BoxOpenStatusInfo>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(BoxOpenStatusInfo boxOpenStatusInfo) {
if (boxOpenStatusInfo != null) {
clBoxHonour.setEnabled(boxOpenStatusInfo.isOpening());
String startTime = TextUtils.isEmpty(boxOpenStatusInfo.getStartTime()) ? "" : boxOpenStatusInfo.getStartTime();
String endTime = TextUtils.isEmpty(boxOpenStatusInfo.getEndTime()) ? "" : boxOpenStatusInfo.getEndTime();
honourLimitTip.setText(String.format("限时:%s - %s", startTime, endTime));
} else {
clBoxHonour.setEnabled(false);
honourLimitTip.setVisibility(View.GONE);
}
}
@Override
public void onError(Throwable e) {
clBoxHonour.setEnabled(false);
honourLimitTip.setVisibility(View.GONE);
}
});
} }
@Override @Override

View File

@@ -133,19 +133,6 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_honour_box_limit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:textColor="#CCFFFFFF"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@id/cl_box_honour"
app:layout_constraintStart_toStartOf="@id/cl_box_honour"
app:layout_constraintTop_toBottomOf="@id/cl_box_honour"
tools:ignore="SmallSp"
tools:text="限时22:00 - 02:00" />
<LinearLayout <LinearLayout
android:id="@+id/ll_get_key" android:id="@+id/ll_get_key"
@@ -155,7 +142,7 @@
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_honour_box_limit"> app:layout_constraintTop_toBottomOf="@id/cl_box_honour">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@@ -106,7 +106,7 @@ public class UriProvider {
* 帮助页 * 帮助页
*/ */
public static String getHelp() { public static String getHelp() {
return IM_SERVER_URL.concat("/accompany/modules/rank/index.html#/wishingWellHelp"); return IM_SERVER_URL.concat("/accompany/modules/rule/guide.html");
} }
/** /**

View File

@@ -130,9 +130,7 @@ public final class UserModel extends BaseModel implements IUserModel {
*/ */
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private void onLogin(final long uid) { private void onLogin(final long uid) {
api.requestUserInfo( api.requestUserInfo(String.valueOf(uid))
String.valueOf(uid)
)
.compose(RxHelper.handleSchedulers()) .compose(RxHelper.handleSchedulers())
.flatMap((Function<UserResult, SingleSource<UserInfo>>) userResult -> { .flatMap((Function<UserResult, SingleSource<UserInfo>>) userResult -> {
if (userResult == null || !userResult.isSuccess() || userResult.getData() == null) { if (userResult == null || !userResult.isSuccess() || userResult.getData() == null) {