mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
parent
154f1622b2
commit
293cccd897
3 changed files with 12 additions and 3 deletions
|
|
@ -263,6 +263,9 @@ public class CategoryImagesListFragment extends DaggerFragment {
|
||||||
* @return GridView Adapter
|
* @return GridView Adapter
|
||||||
*/
|
*/
|
||||||
public ListAdapter getAdapter() {
|
public ListAdapter getAdapter() {
|
||||||
|
if(gridView == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return gridView.getAdapter();
|
return gridView.getAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,9 @@ public class SearchImageFragment extends CommonsDaggerSupportFragment {
|
||||||
*/
|
*/
|
||||||
public void updateImageList(String query) {
|
public void updateImageList(String query) {
|
||||||
this.query = query;
|
this.query = query;
|
||||||
imagesNotFoundView.setVisibility(GONE);
|
if(imagesNotFoundView != null) {
|
||||||
|
imagesNotFoundView.setVisibility(GONE);
|
||||||
|
}
|
||||||
if(!NetworkUtils.isInternetConnectionEstablished(getContext())) {
|
if(!NetworkUtils.isInternetConnectionEstablished(getContext())) {
|
||||||
handleNoInternet();
|
handleNoInternet();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,12 @@ public class FileUtils {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
out.close();
|
if(out != null) {
|
||||||
in.close();
|
out.close();
|
||||||
|
}
|
||||||
|
if(in != null) {
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue