Fixes crashes when filtering notifications
This commit is contained in:
parent
21ad71a3e6
commit
a5cade3fe4
|
@ -258,23 +258,11 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
|
||||||
if( context == null)
|
if( context == null)
|
||||||
return;
|
return;
|
||||||
max_id = null;
|
max_id = null;
|
||||||
notifications = new ArrayList<>();
|
|
||||||
firstLoad = true;
|
firstLoad = true;
|
||||||
flag_loading = true;
|
flag_loading = true;
|
||||||
swiped = true;
|
swiped = true;
|
||||||
MainActivity.countNewNotifications = 0;
|
MainActivity.countNewNotifications = 0;
|
||||||
if( context != null)
|
asyncTask = new RetrieveNotificationsAsyncTask(context, true, null, null, max_id, null, null, DisplayNotificationsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
asyncTask = new RetrieveNotificationsAsyncTask(context, true, null, null, max_id, null, null, DisplayNotificationsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
||||||
else {
|
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if( context != null){
|
|
||||||
asyncTask = new RetrieveNotificationsAsyncTask(context, true, null, null, max_id, null, null, DisplayNotificationsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue