Skip to content
Snippets Groups Projects
Commit 17f8b2c2 authored by Aline Bonnet's avatar Aline Bonnet
Browse files

smartlist: fix the new quick conversation

When displaying the first notification, a new quick conversation is
displayed on top of the smartlist, above the existing conversation
because it receives a Daemon event that is not for it.

Change-Id: I0114a1da41a9678def20ee9997737599d4015714
Tuleap: #1446
parent 60520ab3
No related branches found
No related tags found
No related merge requests found
...@@ -113,6 +113,7 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex ...@@ -113,6 +113,7 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex
private MenuItem mSearchMenuItem = null; private MenuItem mSearchMenuItem = null;
private MenuItem mDialpadMenuItem = null; private MenuItem mDialpadMenuItem = null;
private String mLastBlockchainQuery = null; private String mLastBlockchainQuery = null;
private Boolean isSearching = false;
@BindView(R.id.confs_list) @BindView(R.id.confs_list)
ListView mList; ListView mList;
...@@ -305,6 +306,7 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex ...@@ -305,6 +306,7 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex
displayFloatingActionButtonWithDelay(true, 50); displayFloatingActionButtonWithDelay(true, 50);
setOverflowMenuVisible(menu, true); setOverflowMenuVisible(menu, true);
setLoading(false); setLoading(false);
isSearching = false;
return true; return true;
} }
...@@ -314,6 +316,7 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex ...@@ -314,6 +316,7 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex
displayFloatingActionButtonWithDelay(false, 0); displayFloatingActionButtonWithDelay(false, 0);
setOverflowMenuVisible(menu, false); setOverflowMenuVisible(menu, false);
setLoading(false); setLoading(false);
isSearching = true;
return true; return true;
} }
}); });
...@@ -820,6 +823,9 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex ...@@ -820,6 +823,9 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex
} }
if (event.getEventType() == DaemonEvent.EventType.REGISTERED_NAME_FOUND) { if (event.getEventType() == DaemonEvent.EventType.REGISTERED_NAME_FOUND) {
if (!isSearching) {
return;
}
RingApplication.uiHandler.post(new Runnable() { RingApplication.uiHandler.post(new Runnable() {
@Override @Override
public void run() { public void run() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment