Skip to content

Commit

Permalink
修改项目图标与事件bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dingyes committed May 14, 2021
1 parent 6d33a33 commit 09c5618
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,9 @@ protected void onStart(Intent intent) {
super.onStart(intent);
super.setUIContent(ResourceTable.Layout_ability_details_event_introduce);
flag = false;
// 判断是否为迁移的数据
if (dynastyId == 0 || eventId == 0) {
//获取信息
dynastyId = intent.getIntParam("dynastyId", 1);
eventId = intent.getIntParam("eventId", 1);
}
//获取信息
dynastyId = intent.getIntParam("dynastyId", 1);
eventId = intent.getIntParam("eventId", 1);

//初始化并发任务分发器
parallelTaskDispatcher = createParallelTaskDispatcher("detailsEventIntroducePageParallelTaskDispatcher", TaskPriority.DEFAULT);
Expand Down Expand Up @@ -154,8 +151,7 @@ public void run() {
incident = gson.fromJson(json, Incident.class);
//获取list集合
dialogList = incident.getIncidentDialog().split(Constant.DELIMITER);
eventHandler.sendEvent(ServiceConfig.INCIDENT_DETAILS_URL_THREAD);

getMainTaskDispatcher().syncDispatch(() -> setLayout());
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,21 @@ public void onClick(Component component) {
}
break;
case ResourceTable.Id_event:
//跳转朝代事件页面
Intent intent = new Intent();
Operation operation = new Intent.OperationBuilder()
.withDeviceId("")
.withBundleName("com.example.timesequence")
.withAbilityName("com.example.timesequence.ability.dynasty.DetailsEventAbility")
.build();
intent.setParam("dynastyId", dynastyId);
intent.setParam("dynastyName", dynasty.getDynastyName());
intent.setOperation(operation);
startAbility(intent);
if (dynastyId == 11) {
//跳转朝代事件页面
Intent intent = new Intent();
Operation operation = new Intent.OperationBuilder()
.withDeviceId("")
.withBundleName("com.example.timesequence")
.withAbilityName("com.example.timesequence.ability.dynasty.DetailsEventAbility")
.build();
intent.setParam("dynastyId", dynastyId);
intent.setParam("dynastyName", dynasty.getDynastyName());
intent.setOperation(operation);
startAbility(intent);
} else {
ToastUtil.showEncourageToast(getContext(), "此朝代还没有事件,去唐朝看看吧~");
}
break;
case ResourceTable.Id_speech:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
ohos:height="match_content"
ohos:width="35vp"
ohos:multiple_lines="true"
ohos:text="贞观之治"
ohos:text_alignment="center"
ohos:text_color="$color:ourDynastyRed"
ohos:text_size="25fp"
Expand Down
Binary file modified project/TimeStory/entry/src/main/resources/base/media/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 09c5618

Please sign in to comment.