Skip to content

Commit 19e1aa5

Browse files
committed
This was crashing the app
Signed-off-by: Umair Khan <[email protected]>
1 parent d1579c6 commit 19e1aa5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

App/src/main/java/in/ac/dtu/subtlenews/MainFragment.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ protected ArrayList<JSONObject> doInBackground(Void... v) {
118118

119119
} catch (Exception e){
120120
e.printStackTrace();
121-
new UpdateNews(getActivity()).execute();
121+
if (Utils.isNetworkConnected(getActivity())) {
122+
new UpdateNews(getActivity()).execute();
123+
}
124+
122125
}
123126

124127
ArrayList<JSONObject> selectedCategoryList = new ArrayList<JSONObject>();

0 commit comments

Comments
 (0)