mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-27 09:06:46 +00:00
Some tweaks to the camera FAB.
This commit is contained in:
@@ -117,7 +117,7 @@ public class ConversationListFragment extends Fragment
|
||||
private ImageView emptyImage;
|
||||
private TextView emptySearch;
|
||||
private PulsingFloatingActionButton fab;
|
||||
private FloatingActionButton cameraFab;
|
||||
private PulsingFloatingActionButton cameraFab;
|
||||
private Locale locale;
|
||||
private String queryFilter = "";
|
||||
private boolean archive;
|
||||
@@ -141,8 +141,13 @@ public class ConversationListFragment extends Fragment
|
||||
emptyImage = ViewUtil.findById(view, R.id.empty);
|
||||
emptySearch = ViewUtil.findById(view, R.id.empty_search);
|
||||
|
||||
if (archive) fab.hide();
|
||||
else fab.show();
|
||||
if (archive) {
|
||||
fab.hide();
|
||||
cameraFab.hide();
|
||||
} else {
|
||||
fab.show();
|
||||
cameraFab.show();
|
||||
}
|
||||
|
||||
reminderView.setOnDismissListener(() -> updateReminders(true));
|
||||
|
||||
@@ -189,6 +194,7 @@ public class ConversationListFragment extends Fragment
|
||||
super.onPause();
|
||||
|
||||
fab.stopPulse();
|
||||
cameraFab.stopPulse();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@@ -382,6 +388,7 @@ public class ConversationListFragment extends Fragment
|
||||
emptySearch.setVisibility(View.INVISIBLE);
|
||||
emptyImage.setImageResource(EMPTY_IMAGES[(int) (Math.random() * EMPTY_IMAGES.length)]);
|
||||
fab.startPulse(3 * 1000);
|
||||
cameraFab.startPulse(3 * 1000);
|
||||
} else if ((cursor == null || cursor.getCount() <= 0) && !TextUtils.isEmpty(queryFilter)) {
|
||||
list.setVisibility(View.INVISIBLE);
|
||||
emptyState.setVisibility(View.GONE);
|
||||
@@ -392,6 +399,7 @@ public class ConversationListFragment extends Fragment
|
||||
emptyState.setVisibility(View.GONE);
|
||||
emptySearch.setVisibility(View.INVISIBLE);
|
||||
fab.stopPulse();
|
||||
cameraFab.stopPulse();
|
||||
}
|
||||
|
||||
getListAdapter().changeCursor(cursor);
|
||||
|
||||
Reference in New Issue
Block a user