Fix for broken build

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-11-04 12:29:14 -08:00
parent 849c346a21
commit 5704fad7cc
2 changed files with 13 additions and 16 deletions

View File

@ -236,15 +236,12 @@ public class ConversationFragment extends Fragment
}
private void handleDeleteMessages(final Set<MessageRecord> messageRecords) {
int messagesCount = messageRecords.size();
AlertDialogWrapper.Builder builder = new AlertDialogWrapper.Builder(getActivity());
int messagesCount = messageRecords.size();
AlertDialogWrapper.Builder builder = new AlertDialogWrapper.Builder(getActivity());
builder.setIconAttribute(R.attr.dialog_alert_icon);
builder.setTitle(getContext().getResources().getQuantityString(
R.plurals.ConversationFragment_delete_selected_messages,
messagesCount, messagesCount));
builder.setMessage(getContext().getResources().getQuantityString(
R.plurals.ConversationFragment_this_will_permanently_delete_all_n_selected_messages,
messagesCount, messagesCount));
builder.setTitle(getActivity().getResources().getQuantityString(R.plurals.ConversationFragment_delete_selected_messages, messagesCount, messagesCount));
builder.setMessage(getActivity().getResources().getQuantityString(R.plurals.ConversationFragment_this_will_permanently_delete_all_n_selected_messages, messagesCount, messagesCount));
builder.setCancelable(true);
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@ -353,7 +350,8 @@ public class ConversationFragment extends Fragment
private class ConversationFragmentItemClickListener implements ItemClickListener {
@Override public void onItemClick(ConversationItem item) {
@Override
public void onItemClick(ConversationItem item) {
if (actionMode != null) {
MessageRecord messageRecord = item.getMessageRecord();
((ConversationAdapter) list.getAdapter()).toggleSelection(messageRecord);
@ -363,7 +361,8 @@ public class ConversationFragment extends Fragment
}
}
@Override public void onItemLongClick(ConversationItem item) {
@Override
public void onItemLongClick(ConversationItem item) {
if (actionMode == null) {
((ConversationAdapter) list.getAdapter()).toggleSelection(item.getMessageRecord());
list.getAdapter().notifyDataSetChanged();

View File

@ -174,12 +174,10 @@ public class ConversationListFragment extends Fragment
int conversationsCount = getListAdapter().getBatchSelections().size();
AlertDialogWrapper.Builder alert = new AlertDialogWrapper.Builder(getActivity());
alert.setIconAttribute(R.attr.dialog_alert_icon);
alert.setTitle(getContext().getResources().getQuantityString(
R.plurals.ConversationListFragment_delete_selected_conversations,
conversationsCount, conversationsCount));
alert.setMessage(getContext().getResources().getQuantityString(
R.plurals.ConversationListFragment_this_will_permanently_delete_all_n_selected_conversations,
conversationsCount, conversationsCount));
alert.setTitle(getActivity().getResources().getQuantityString(R.plurals.ConversationListFragment_delete_selected_conversations,
conversationsCount, conversationsCount));
alert.setMessage(getActivity().getResources().getQuantityString(R.plurals.ConversationListFragment_this_will_permanently_delete_all_n_selected_conversations,
conversationsCount, conversationsCount));
alert.setCancelable(true);
alert.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {