Fix "add podcast" FAB still visible under SpeedDial main FAB (#6950)
This commit is contained in:
parent
da21d92f96
commit
48c0ccb4a2
|
@ -87,6 +87,8 @@ public class SubscriptionFragment extends Fragment
|
|||
private Disposable disposable;
|
||||
private SharedPreferences prefs;
|
||||
|
||||
private FloatingActionButton subscriptionAddButton;
|
||||
|
||||
private SpeedDialView speedDialView;
|
||||
|
||||
private List<NavDrawerData.DrawerItem> listItems;
|
||||
|
@ -155,7 +157,7 @@ public class SubscriptionFragment extends Fragment
|
|||
progressBar = root.findViewById(R.id.progressBar);
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
|
||||
FloatingActionButton subscriptionAddButton = root.findViewById(R.id.subscriptions_add);
|
||||
subscriptionAddButton = root.findViewById(R.id.subscriptions_add);
|
||||
subscriptionAddButton.setOnClickListener(view -> {
|
||||
if (getActivity() instanceof MainActivity) {
|
||||
((MainActivity) getActivity()).loadChildFragment(new AddFeedFragment());
|
||||
|
@ -173,16 +175,6 @@ public class SubscriptionFragment extends Fragment
|
|||
speedDialView = root.findViewById(R.id.fabSD);
|
||||
speedDialView.setOverlayLayout(root.findViewById(R.id.fabSDOverlay));
|
||||
speedDialView.inflate(R.menu.nav_feed_action_speeddial);
|
||||
speedDialView.setOnChangeListener(new SpeedDialView.OnChangeListener() {
|
||||
@Override
|
||||
public boolean onMainActionSelected() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onToggleChanged(boolean isOpen) {
|
||||
}
|
||||
});
|
||||
speedDialView.setOnActionSelectedListener(actionItem -> {
|
||||
new FeedMultiSelectActionHandler((MainActivity) getActivity(), subscriptionAdapter.getSelectedItems())
|
||||
.handleAction(actionItem.getId());
|
||||
|
@ -336,7 +328,6 @@ public class SubscriptionFragment extends Fragment
|
|||
|
||||
Feed feed = ((NavDrawerData.FeedDrawerItem) drawerItem).feed;
|
||||
if (itemId == R.id.multi_select) {
|
||||
speedDialView.setVisibility(View.VISIBLE);
|
||||
return subscriptionAdapter.onContextItemSelected(item);
|
||||
}
|
||||
return FeedMenuHandler.onMenuItemClicked(this, item.getItemId(), feed, this::loadSubscriptions);
|
||||
|
@ -356,6 +347,7 @@ public class SubscriptionFragment extends Fragment
|
|||
public void onEndSelectMode() {
|
||||
speedDialView.close();
|
||||
speedDialView.setVisibility(View.GONE);
|
||||
subscriptionAddButton.setVisibility(View.VISIBLE);
|
||||
subscriptionAdapter.setItems(listItems);
|
||||
}
|
||||
|
||||
|
@ -368,5 +360,7 @@ public class SubscriptionFragment extends Fragment
|
|||
}
|
||||
}
|
||||
subscriptionAdapter.setItems(feedsOnly);
|
||||
speedDialView.setVisibility(View.VISIBLE);
|
||||
subscriptionAddButton.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue