Skip to content

Commit

Permalink
每次打开都是新任务,不受上一次打开文件内容的影响。
Browse files Browse the repository at this point in the history
Signed-off-by: Lin <[email protected]>
  • Loading branch information
Lin committed Jan 4, 2024
1 parent 48c7a30 commit 62dd064
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public static void viewContent(Context context, String name, String content, boo
private static Intent newIntent(Context context, boolean newTask) {
Intent intent = new Intent(context, EditActivity_.class);
if (newTask || !(context instanceof Activity)) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// 添加 FLAG_ACTIVITY_CLEAR_TASK 标志
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
}
return intent;
}
Expand Down

0 comments on commit 62dd064

Please sign in to comment.