1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

Fix message list when no search condition is given (All messages)

This commit is contained in:
cketti 2012-10-21 19:18:57 +02:00
parent f093b84142
commit 93ef3a7b0f
2 changed files with 10 additions and 1 deletions

View File

@ -2649,6 +2649,10 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
private void buildQuery(Account account, ConditionsTreeNode node, StringBuilder query,
List<String> selectionArgs) {
if (node == null) {
return;
}
if (node.mLeft == null && node.mRight == null) {
SearchCondition condition = node.mCondition;
switch (condition.field) {

View File

@ -295,7 +295,12 @@ public class LocalSearch implements SearchSpecification {
* very dirty fix for remotesearch support atm
*/
public String getRemoteSearchArguments() {
for (ConditionsTreeNode node : getLeafSet()) {
Set<ConditionsTreeNode> leafSet = getLeafSet();
if (leafSet == null) {
return null;
}
for (ConditionsTreeNode node : leafSet) {
if (node.getCondition().field == Searchfield.SUBJECT ||
node.getCondition().field == Searchfield.SENDER ) {
return node.getCondition().value;