@@ -435,11 +435,8 @@ private void refreshView(LocationServiceManager.LocationChangeType locationChang
435
435
.observeOn (AndroidSchedulers .mainThread ())
436
436
.subscribe (this ::populatePlaces ,
437
437
throwable -> {
438
- if (throwable instanceof UnknownHostException || throwable instanceof ConnectException ) {
439
- showErrorMessage (getString (R .string .slow_internet ));
440
- } else {
441
- showErrorMessage (throwable .getMessage ());
442
- }
438
+ Timber .d (throwable );
439
+ showErrorMessage (getString (R .string .error_fetching_nearby_places ));
443
440
progressBar .setVisibility (View .GONE );
444
441
});
445
442
} else if (locationChangeType
@@ -597,11 +594,8 @@ private void updateMapFragment(boolean isSlightUpdate) {
597
594
.observeOn (AndroidSchedulers .mainThread ())
598
595
.subscribe (this ::populatePlaces ,
599
596
throwable -> {
600
- if (throwable instanceof UnknownHostException || throwable instanceof ConnectException ) {
601
- showErrorMessage (getString (R .string .slow_internet ));
602
- } else {
603
- showErrorMessage (throwable .getMessage ());
604
- }
597
+ Timber .d (throwable );
598
+ showErrorMessage (getString (R .string .error_fetching_nearby_places ));
605
599
progressBar .setVisibility (View .GONE );
606
600
});
607
601
nearbyMapFragment .setBundleForUpdtes (bundle );
@@ -671,9 +665,6 @@ public void prepareViewsForSheetPosition(int bottomSheetState) {
671
665
}
672
666
673
667
private void showErrorMessage (String message ) {
674
- if (TextUtils .isEmpty (message )) {
675
- message = getString (R .string .something_went_wrong );
676
- }
677
668
ViewUtil .showLongToast (NearbyActivity .this , message );
678
669
}
679
670
}
0 commit comments