fixed multi-deletion bug, moved logic into DeleteKeyDialogActivity

This commit is contained in:
Adithya Abraham Philip
2015-07-15 20:16:07 +05:30
parent 771d654766
commit fe0b083bc5
4 changed files with 21 additions and 20 deletions

View File

@@ -125,7 +125,10 @@ public class DeleteResult extends InputPendingResult {
} else {
duration = 0;
style = Style.ERROR;
if (mFail == 0) {
if (mLog.getLast().mType == LogType.MSG_DEL_ERROR_MULTI_SECRET) {
str = activity.getString(R.string.secret_cannot_multiple);
}
else if (mFail == 0) {
str = activity.getString(R.string.delete_nothing);
} else {
str = activity.getResources().getQuantityString(R.plurals.delete_fail, mFail);

View File

@@ -754,7 +754,7 @@ public abstract class OperationResult implements Parcelable {
MSG_GET_QUERY_FAILED(LogLevel.ERROR, R.string.msg_download_query_failed),
MSG_DEL_ERROR_EMPTY (LogLevel.ERROR, R.string.msg_del_error_empty),
MSG_DEL_ERROR_MULTI_SECRET (LogLevel.DEBUG, R.string.msg_del_error_multi_secret),
MSG_DEL_ERROR_MULTI_SECRET (LogLevel.ERROR, R.string.msg_del_error_multi_secret),
MSG_DEL (LogLevel.START, R.plurals.msg_del),
MSG_DEL_KEY (LogLevel.DEBUG, R.string.msg_del_key),
MSG_DEL_KEY_FAIL (LogLevel.WARN, R.string.msg_del_key_fail),