mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 14:49:53 +01:00
Merge branch '576-empty-state-messages-are-briefly-shown-when-they-shouldn-t' into 'master'
Prevent empty state messages from showing briefly When we clear a list in `onPause()`, the proper behavior is that the empty state message is shown, because the list is indeed empty. However, we will reload the list content again in `onResume()`, so the fix chosen in this MR is to force showing the progress bar right after clearing the list. Closes #576 See merge request !267
This commit is contained in:
@@ -82,6 +82,7 @@ public class MyBlogsFragment extends BaseFragment {
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
adapter.clear();
|
adapter.clear();
|
||||||
|
list.showProgressBar();
|
||||||
loadBlogs();
|
loadBlogs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -192,8 +192,9 @@ public class ContactListFragment extends BaseFragment implements EventListener {
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
adapter.clear();
|
|
||||||
eventBus.removeListener(this);
|
eventBus.removeListener(this);
|
||||||
|
adapter.clear();
|
||||||
|
list.showProgressBar();
|
||||||
list.stopPeriodicUpdate();
|
list.stopPeriodicUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ public class ForumListFragment extends BaseEventFragment implements
|
|||||||
super.onPause();
|
super.onPause();
|
||||||
|
|
||||||
adapter.clear();
|
adapter.clear();
|
||||||
|
list.showProgressBar();
|
||||||
list.stopPeriodicUpdate();
|
list.stopPeriodicUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public class ContactChooserFragment extends BaseFragment {
|
|||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
adapter.clear();
|
adapter.clear();
|
||||||
|
list.showProgressBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ abstract class InvitationsActivity extends BriarActivity
|
|||||||
Logger.getLogger(InvitationsActivity.class.getName());
|
Logger.getLogger(InvitationsActivity.class.getName());
|
||||||
|
|
||||||
private InvitationAdapter adapter;
|
private InvitationAdapter adapter;
|
||||||
|
private BriarRecyclerView list;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
protected EventBus eventBus;
|
protected EventBus eventBus;
|
||||||
@@ -40,8 +41,8 @@ abstract class InvitationsActivity extends BriarActivity
|
|||||||
|
|
||||||
adapter = getAdapter(this, this);
|
adapter = getAdapter(this, this);
|
||||||
|
|
||||||
BriarRecyclerView list =
|
|
||||||
(BriarRecyclerView) findViewById(R.id.invitationsView);
|
list = (BriarRecyclerView) findViewById(R.id.invitationsView);
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
list.setLayoutManager(new LinearLayoutManager(this));
|
list.setLayoutManager(new LinearLayoutManager(this));
|
||||||
list.setAdapter(adapter);
|
list.setAdapter(adapter);
|
||||||
@@ -60,6 +61,7 @@ abstract class InvitationsActivity extends BriarActivity
|
|||||||
super.onPause();
|
super.onPause();
|
||||||
eventBus.removeListener(this);
|
eventBus.removeListener(this);
|
||||||
adapter.clear();
|
adapter.clear();
|
||||||
|
list.showProgressBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user