We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1579c6 commit 19e1aa5Copy full SHA for 19e1aa5
App/src/main/java/in/ac/dtu/subtlenews/MainFragment.java
@@ -118,7 +118,10 @@ protected ArrayList<JSONObject> doInBackground(Void... v) {
118
119
} catch (Exception e){
120
e.printStackTrace();
121
- new UpdateNews(getActivity()).execute();
+ if (Utils.isNetworkConnected(getActivity())) {
122
+ new UpdateNews(getActivity()).execute();
123
+ }
124
+
125
}
126
127
ArrayList<JSONObject> selectedCategoryList = new ArrayList<JSONObject>();
0 commit comments