mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +00:00
Check null url. Fixes austinhuang0131/barinsta#1192
This commit is contained in:
parent
16381ad522
commit
3cc4f7b7bc
@ -134,7 +134,14 @@ public class ProfilePicDialogFragment extends DialogFragment {
|
||||
@Override
|
||||
public void onSuccess(final User result) {
|
||||
if (result != null) {
|
||||
setupPhoto(result.getHDProfilePicUrl());
|
||||
final String url = result.getHDProfilePicUrl();
|
||||
if (url == null) {
|
||||
final Context context = getContext();
|
||||
if (context == null) return;
|
||||
Toast.makeText(context, R.string.no_profile_pic_found, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
setupPhoto(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,9 @@ public class User implements Serializable {
|
||||
}
|
||||
|
||||
public String getHDProfilePicUrl() {
|
||||
if (hdProfilePicUrlInfo == null) {
|
||||
return getProfilePicUrl();
|
||||
}
|
||||
return hdProfilePicUrlInfo.getUrl();
|
||||
}
|
||||
|
||||
|
@ -504,4 +504,5 @@
|
||||
<string name="clear">Clear</string>
|
||||
<string name="no_external_map_app">No Map app found!</string>
|
||||
<string name="click_to_show_full">Click to view full count</string>
|
||||
<string name="no_profile_pic_found">No profile pic found!</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user