修改了私密模式中的bug

pull/3/head
Morningstar 1 year ago
parent a22cc82f5b
commit 9d337cc287

@ -848,7 +848,7 @@ public class NotesListActivity extends AppCompatActivity implements OnClickListe
break; break;
} }
case R.id.menu_secret: { //进入私密模式 case R.id.menu_secret: { //进入私密模式
secret_mode = 1;
AlertDialog.Builder dialog = new AlertDialog.Builder(NotesListActivity.this); AlertDialog.Builder dialog = new AlertDialog.Builder(NotesListActivity.this);
dialog.setTitle("重要提醒"); dialog.setTitle("重要提醒");
dialog.setMessage("您确认进入私密模式吗?"); dialog.setMessage("您确认进入私密模式吗?");
@ -856,21 +856,25 @@ public class NotesListActivity extends AppCompatActivity implements OnClickListe
dialog.setPositiveButton("确认", new DialogInterface.OnClickListener() { dialog.setPositiveButton("确认", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
secret_mode = 1;
startAsyncNotesListQuery(); startAsyncNotesListQuery();
Toast.makeText(NotesListActivity.this,"您已进入私密模式",Toast.LENGTH_SHORT).show(); Toast.makeText(NotesListActivity.this,"您已进入私密模式",Toast.LENGTH_SHORT).show();
} }
}); });
dialog.setNegativeButton("取消", new DialogInterface.OnClickListener() { dialog.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which){} public void onClick(DialogInterface dialog, int which){
secret_mode = 0;
startAsyncNotesListQuery();
}
}); });
dialog.show(); dialog.show();
startAsyncNotesListQuery();
Toast.makeText(this,"您已进入私密模式",Toast.LENGTH_SHORT).show(); // Toast.makeText(this,"您已进入私密模式",Toast.LENGTH_SHORT).show();
break; break;
} }
case R.id.menu_quit_secret:{ //退出私密模式 case R.id.menu_quit_secret:{ //退出私密模式
secret_mode = 0;
AlertDialog.Builder dialog = new AlertDialog.Builder(NotesListActivity.this); AlertDialog.Builder dialog = new AlertDialog.Builder(NotesListActivity.this);
dialog.setTitle("重要提醒"); dialog.setTitle("重要提醒");
dialog.setMessage("您确认退出私密模式吗?"); dialog.setMessage("您确认退出私密模式吗?");
@ -878,13 +882,17 @@ public class NotesListActivity extends AppCompatActivity implements OnClickListe
dialog.setPositiveButton("确认", new DialogInterface.OnClickListener() { dialog.setPositiveButton("确认", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
secret_mode = 0;
startAsyncNotesListQuery(); startAsyncNotesListQuery();
Toast.makeText(NotesListActivity.this,"您已退出私密模式",Toast.LENGTH_SHORT).show(); Toast.makeText(NotesListActivity.this,"您已退出私密模式",Toast.LENGTH_SHORT).show();
} }
}); });
dialog.setNegativeButton("取消", new DialogInterface.OnClickListener() { dialog.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which){} public void onClick(DialogInterface dialog, int which){
secret_mode = 1;
startAsyncNotesListQuery();
}
}); });
dialog.show(); dialog.show();
break; break;

Loading…
Cancel
Save