Commit 2dbd0d01 authored by Alexandre Perraud's avatar Alexandre Perraud

Fix the no-media view behaviour

parent 9f1c2d8b
......@@ -10,8 +10,8 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="96"
height="96"
width="48"
height="48"
id="svg3075"
version="1.1"
inkscape:version="0.91 r13725"
......@@ -216,8 +216,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="41.945225"
inkscape:cy="66.860488"
inkscape:cx="20.028429"
inkscape:cy="31.471067"
inkscape:document-units="px"
inkscape:current-layer="g3158"
showgrid="true"
......@@ -252,13 +252,13 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-956.3622)">
transform="translate(0,-1004.3622)">
<g
id="g3158"
transform="matrix(3.2814457,0,0,3.2814457,1.9860072,-2409.9574)">
<g
id="g3192"
transform="matrix(0.05258323,0,0,0.05258323,-37.288627,957.04367)"
transform="matrix(0.02629162,0,0,0.02629162,-18.94693,1006.0819)"
inkscape:export-filename="/home/corbax/Dev/Design/Icons/test2.png"
inkscape:export-xdpi="600"
inkscape:export-ydpi="600">
......
......@@ -182,7 +182,7 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
if (refresh)
updateList();
else {
mViewNomedia.setVisibility(View.GONE);
mViewNomedia.setVisibility(mVideoAdapter.getItemCount() > 0 ? View.GONE : View.VISIBLE);
}
//Get & set times
ArrayMap<String, Long> times = MediaDatabase.getInstance().getVideoTimes();
......@@ -382,7 +382,7 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
if (item.getType() != MediaWrapper.TYPE_VIDEO)
return;
mVideoAdapter.update(item);
mViewNomedia.setVisibility(View.GONE);
mViewNomedia.setVisibility(mVideoAdapter.getItemCount() > 0 ? View.GONE : View.VISIBLE);
}
public void updateList() {
......@@ -496,10 +496,8 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
if (action.equalsIgnoreCase(MediaUtils.ACTION_SCAN_START)) {
mLayoutFlipperLoading.setVisibility(View.VISIBLE);
mTextViewNomedia.setVisibility(View.INVISIBLE);
} else if (action.equalsIgnoreCase(MediaUtils.ACTION_SCAN_STOP)) {
mLayoutFlipperLoading.setVisibility(View.INVISIBLE);
mTextViewNomedia.setVisibility(View.VISIBLE);
}
}
};
......
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