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:
parent
f093b84142
commit
93ef3a7b0f
@ -2649,6 +2649,10 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||||||
private void buildQuery(Account account, ConditionsTreeNode node, StringBuilder query,
|
private void buildQuery(Account account, ConditionsTreeNode node, StringBuilder query,
|
||||||
List<String> selectionArgs) {
|
List<String> selectionArgs) {
|
||||||
|
|
||||||
|
if (node == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (node.mLeft == null && node.mRight == null) {
|
if (node.mLeft == null && node.mRight == null) {
|
||||||
SearchCondition condition = node.mCondition;
|
SearchCondition condition = node.mCondition;
|
||||||
switch (condition.field) {
|
switch (condition.field) {
|
||||||
|
@ -295,7 +295,12 @@ public class LocalSearch implements SearchSpecification {
|
|||||||
* very dirty fix for remotesearch support atm
|
* very dirty fix for remotesearch support atm
|
||||||
*/
|
*/
|
||||||
public String getRemoteSearchArguments() {
|
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 ||
|
if (node.getCondition().field == Searchfield.SUBJECT ||
|
||||||
node.getCondition().field == Searchfield.SENDER ) {
|
node.getCondition().field == Searchfield.SENDER ) {
|
||||||
return node.getCondition().value;
|
return node.getCondition().value;
|
||||||
|
Loading…
Reference in New Issue
Block a user