Improve entrance animations on convo page
By moving loading in each controller to the same thread. There will still be shifting as the conversation prefs are added, but it won't be the over thte top shift up and shift down motion that existed prior to this cl. Test: manual Fixes: 188734400 Change-Id: I202981b603b8f9308b2b352a0939182910869cd6
This commit is contained in:
@@ -67,22 +67,9 @@ public class PriorityConversationsPreferenceController extends
|
||||
public void updateState(Preference preference) {
|
||||
PreferenceCategory pref = (PreferenceCategory) preference;
|
||||
// Load conversations
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground(Void... unused) {
|
||||
mConversations = mBackend.getConversations(true).getList();
|
||||
Collections.sort(mConversations, mConversationComparator);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void unused) {
|
||||
if (mContext == null) {
|
||||
return;
|
||||
}
|
||||
populateList(mConversations, pref);
|
||||
}
|
||||
}.execute();
|
||||
mConversations = mBackend.getConversations(true).getList();
|
||||
Collections.sort(mConversations, mConversationComparator);
|
||||
|
||||
populateList(mConversations, pref);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user