1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-07 23:47:30 +00:00
This commit is contained in:
Ammar Githam 2021-05-10 21:22:35 +09:00
parent 16381ad522
commit 3cc4f7b7bc
3 changed files with 12 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -111,6 +111,9 @@ public class User implements Serializable {
}
public String getHDProfilePicUrl() {
if (hdProfilePicUrlInfo == null) {
return getProfilePicUrl();
}
return hdProfilePicUrlInfo.getUrl();
}

View File

@ -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>