游戏修改,粉丝团提示修改

This commit is contained in:
18401019693
2023-10-05 15:44:37 +08:00
parent 69c0d5f28a
commit c1d6b67322
8 changed files with 138 additions and 61 deletions

View File

@@ -33,7 +33,7 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view, parent, false);
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view3, parent, false);
return new InteractionGamesChildViewHolder(runGamesView);
}

View File

@@ -106,14 +106,14 @@ public class CreateSudGamePopup extends BottomPopupView {
String name = roomName.getText().toString();
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
if (name.length() > 10) {
ToastUtil.show("间名太长");
ToastUtil.show("間名长度为[1-10]");
return;
}
}
if (IMLoginManager.get(getContext()).getLocaleLanguage() != Locale.SIMPLIFIED_CHINESE) {
if (name.length() > 15) {
ToastUtil.show("The room name is too long");
ToastUtil.show("Room name length is [1-15]");
return;
}

View File

@@ -96,6 +96,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
search(value);
} else {
findViewById(R.id.layout_history_empty).setVisibility(GONE);
switchList(true);
}
}
@@ -144,7 +145,9 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
}
});
}
private void initHistoryData() {
searchHistory.removeAllViews();
String value = SpUtil.getStringValue(SP_HISTORY);
historyList = new ArrayList<>();
if (!StringUtil.isEmpty(value)) {
@@ -158,18 +161,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
}
private void search(String value) {
boolean isValue = false;
for (String str : historyList) {
if (!isValue) {
isValue = TextUtils.equals(value, str);
}
}
if (!isValue) {
historyList.add(value);
SpUtil.setStringValue(SP_HISTORY, JSONArray.toJSONString(historyList));
addHistoryData(value);
}
LiveNetManager.get(mContext)
.searchRoomList("0", "0,0", "0", value, 0, new HttpCallback<List<SudRoomListModel>>() {
@Override
@@ -178,14 +170,42 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
switchList(false);
sudGameListAdapter.setList(data);
findViewById(R.id.layout_history_empty).setVisibility(GONE);
boolean isValue = false;
for (String str : historyList) {
if (!isValue) {
isValue = TextUtils.equals(value, str);
}
}
if (!isValue) {
if (historyList.size() < 6) {
if (historyList.size() == 5) {
historyList.remove(0);
}
historyList.add(value);
SpUtil.setStringValue(SP_HISTORY, JSONArray.toJSONString(historyList));
searchHistory.removeAllViews();
for (String str : historyList) {
addHistoryData(str);
}
}
}
}else {
findViewById(R.id.layout_history_empty).setVisibility(VISIBLE);
listRoom.setVisibility(GONE);
history.setVisibility(GONE);
}
}
@Override
public void onError(String error) {
findViewById(R.id.layout_history_empty).setVisibility(VISIBLE);
switchList(false);
}
});
}

View File

@@ -2228,7 +2228,7 @@ public class LiveNetManager {
@Override
public void accept(ResponseModel<CreateSudRoomModel> createSudRoomModelResponseModel) throws Exception {
if (callback != null) {
if (createSudRoomModelResponseModel.getData().getCode() == 200) {
if (createSudRoomModelResponseModel.getData().getCode() == 0) {
callback.onSuccess(createSudRoomModelResponseModel.getData().getInfo());
} else {
callback.onError(createSudRoomModelResponseModel.getData().getMsg());