mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Fixed whitespace (tabs vs. spaces)
This commit is contained in:
parent
58c01c05b7
commit
6bdaac4353
@ -216,7 +216,7 @@ public class ChooseFolder extends K9ListActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case R.id.filter_folders: {
|
case R.id.filter_folders: {
|
||||||
onEnterFilter();
|
onEnterFilter();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
@ -236,43 +236,43 @@ public class ChooseFolder extends K9ListActivity {
|
|||||||
* Filter {@link #mAdapter} with the user-input.
|
* Filter {@link #mAdapter} with the user-input.
|
||||||
*/
|
*/
|
||||||
private void onEnterFilter() {
|
private void onEnterFilter() {
|
||||||
final AlertDialog.Builder filterAlert = new AlertDialog.Builder(this);
|
final AlertDialog.Builder filterAlert = new AlertDialog.Builder(this);
|
||||||
|
|
||||||
final EditText input = new EditText(this);
|
final EditText input = new EditText(this);
|
||||||
input.addTextChangedListener(new TextWatcher() {
|
input.addTextChangedListener(new TextWatcher() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
mAdapter.getFilter().filter(input.getText().toString());
|
mAdapter.getFilter().filter(input.getText().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count,
|
public void beforeTextChanged(CharSequence s, int start, int count,
|
||||||
int after) {
|
int after) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
input.setHint(R.string.folder_list_filter_hint);
|
input.setHint(R.string.folder_list_filter_hint);
|
||||||
filterAlert.setView(input);
|
filterAlert.setView(input);
|
||||||
|
|
||||||
filterAlert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
filterAlert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
String value = input.getText().toString().trim();
|
String value = input.getText().toString().trim();
|
||||||
mAdapter.getFilter().filter(value);
|
mAdapter.getFilter().filter(value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
filterAlert.setNegativeButton("Cancel",
|
filterAlert.setNegativeButton("Cancel",
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
mAdapter.getFilter().filter("");
|
mAdapter.getFilter().filter("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
filterAlert.show();
|
filterAlert.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,10 +378,10 @@ public class ChooseFolder extends K9ListActivity {
|
|||||||
int position = 0;
|
int position = 0;
|
||||||
for (String name : localFolders) {
|
for (String name : localFolders) {
|
||||||
if (mAccount.getInboxFolderName().equalsIgnoreCase(name)) {
|
if (mAccount.getInboxFolderName().equalsIgnoreCase(name)) {
|
||||||
folderList.add(getString(R.string.special_mailbox_name_inbox));
|
folderList.add(getString(R.string.special_mailbox_name_inbox));
|
||||||
heldInbox = name;
|
heldInbox = name;
|
||||||
} else if (!K9.ERROR_FOLDER_NAME.equals(name) && !account.getOutboxFolderName().equals(name)) {
|
} else if (!K9.ERROR_FOLDER_NAME.equals(name) && !account.getOutboxFolderName().equals(name)) {
|
||||||
folderList.add(name);
|
folderList.add(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mSelectFolder != null) {
|
if (mSelectFolder != null) {
|
||||||
@ -402,11 +402,11 @@ public class ChooseFolder extends K9ListActivity {
|
|||||||
} finally {
|
} finally {
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
// Now we're in the UI-thread, we can safely change the contents of the adapter.
|
// Now we're in the UI-thread, we can safely change the contents of the adapter.
|
||||||
mAdapter.clear();
|
mAdapter.clear();
|
||||||
for (String folderName: folderList) {
|
for (String folderName: folderList) {
|
||||||
mAdapter.add(folderName);
|
mAdapter.add(folderName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user