mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Fix UI search layout
This commit is contained in:
@@ -120,12 +120,14 @@ public class HomeFragment extends Fragment {
|
||||
@Override
|
||||
public void onFailure(Call<List<Food>> call, Throwable t) {
|
||||
//Check internet connection
|
||||
if(Common.checkInternetConnection(getContext())){
|
||||
//Has internet connection
|
||||
Toast.makeText(getContext(), "Error: " + t, Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
//No internet, show notification
|
||||
Common.showErrorInternetConnectionNotification(getActivity());
|
||||
if(getContext() != null){
|
||||
if(Common.checkInternetConnection(getContext())){
|
||||
//Has internet connection
|
||||
Toast.makeText(getContext(), "Error: " + t, Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
//No internet, show notification
|
||||
Common.showErrorInternetConnectionNotification(getActivity());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user