Commit de4db076 authored by Geoffrey Métais's avatar Geoffrey Métais

Fix FAB visibility on network root level

parent 2e74cb21
Pipeline #4422 failed with stage
in 18 minutes and 26 seconds
...@@ -34,6 +34,7 @@ import android.view.MenuInflater; ...@@ -34,6 +34,7 @@ import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import org.jetbrains.annotations.NotNull;
import org.videolan.medialibrary.media.MediaWrapper; import org.videolan.medialibrary.media.MediaWrapper;
import org.videolan.vlc.ExternalMonitor; import org.videolan.vlc.ExternalMonitor;
import org.videolan.vlc.R; import org.videolan.vlc.R;
...@@ -51,6 +52,7 @@ import androidx.fragment.app.FragmentManager; ...@@ -51,6 +52,7 @@ import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders; import androidx.lifecycle.ViewModelProviders;
import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.RecyclerView;
public class NetworkBrowserFragment extends BaseBrowserFragment { public class NetworkBrowserFragment extends BaseBrowserFragment {
...@@ -129,8 +131,6 @@ public class NetworkBrowserFragment extends BaseBrowserFragment { ...@@ -129,8 +131,6 @@ public class NetworkBrowserFragment extends BaseBrowserFragment {
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
setFabPlayVisibility(false);
mFabPlay.setOnClickListener(null);
if (!isRootDirectory()) LocalBroadcastManager.getInstance(VLCApplication.getAppContext()).unregisterReceiver(mLocalReceiver); if (!isRootDirectory()) LocalBroadcastManager.getInstance(VLCApplication.getAppContext()).unregisterReceiver(mLocalReceiver);
setGoBack(false); setGoBack(false);
} }
...@@ -213,4 +213,10 @@ public class NetworkBrowserFragment extends BaseBrowserFragment { ...@@ -213,4 +213,10 @@ public class NetworkBrowserFragment extends BaseBrowserFragment {
else setGoBack(true); else setGoBack(true);
} }
}; };
@Override
public void onUpdateFinished(@NotNull RecyclerView.Adapter<?> adapter) {
super.onUpdateFinished(adapter);
if (isRootDirectory()) mFabPlay.show();
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment