Merge pull request #458 from FineFindus/feat/share-profile-picture

fix: show profile picture in share sheet
This commit is contained in:
LucasGGamerM
2024-07-15 17:16:11 -03:00
committed by GitHub
2 changed files with 2 additions and 12 deletions

View File

@@ -1765,9 +1765,9 @@ public class UiUtils {
ImageCache cache=ImageCache.getInstance(context);
try{
File ava=cache.getFile(new UrlImageLoaderRequest(account.avatarStatic));
if(!ava.exists())
if(ava==null || !ava.exists())
ava=cache.getFile(new UrlImageLoaderRequest(account.avatar));
if(ava.exists()){
if(ava!=null && ava.exists()){
intent.setClipData(ClipData.newRawUri(null, getFileProviderUri(context, ava)));
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
}