增加映射后,本次添加的映射名称自动写入搜索栏
This commit is contained in:
parent
5e88420108
commit
afbb4b7e92
|
|
@ -348,8 +348,15 @@ public class ProviderSelectScreen extends Screen {
|
||||||
boolean ok = com.extendedae_plus.util.ExtendedAEPatternUploadUtil.addOrUpdateAliasMapping(key, val);
|
boolean ok = com.extendedae_plus.util.ExtendedAEPatternUploadUtil.addOrUpdateAliasMapping(key, val);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
if (player != null) player.sendSystemMessage(Component.literal("已添加/更新映射: " + key + " -> " + val));
|
if (player != null) player.sendSystemMessage(Component.literal("已添加/更新映射: " + key + " -> " + val));
|
||||||
|
// 将刚添加的中文名写入搜索框,作为当前查询
|
||||||
|
this.query = val;
|
||||||
|
if (this.searchBox != null) {
|
||||||
|
this.searchBox.setValue(val);
|
||||||
|
}
|
||||||
// 更新本地过滤显示(若名称包含中文可被搜索)
|
// 更新本地过滤显示(若名称包含中文可被搜索)
|
||||||
applyFilter();
|
applyFilter();
|
||||||
|
// 回到第一页以展示最新筛选结果
|
||||||
|
page = 0;
|
||||||
needsRefresh = true;
|
needsRefresh = true;
|
||||||
} else {
|
} else {
|
||||||
if (player != null) player.sendSystemMessage(Component.literal("写入映射失败"));
|
if (player != null) player.sendSystemMessage(Component.literal("写入映射失败"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user